[Bug rtl-optimization/71118] New: [5 Regression] ftois instruction not emitted for float -> int bitcast
mattst88 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sat May 14 23:31:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71118
Bug ID: 71118
Summary: [5 Regression] ftois instruction not emitted for float
-> int bitcast
Product: gcc
Version: 5.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: mattst88 at gmail dot com
Target Milestone: ---
Created attachment 38490
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38490&action=edit
ftois.c
For the attached ftois.c, gcc-4.9.3 -O2 -mcpu=ev67 emits
0000000000000000 <f2i>:
0: 01 0f 1f 72 ftois $f16,t0
4: 00 00 e1 43 sextl t0,v0
8: 01 80 fa 6b ret
c: 00 00 fe 2f unop
0000000000000010 <f2l>:
10: 01 0f 1f 72 ftois $f16,t0
14: 20 f6 21 48 zapnot t0,0xf,v0
18: 01 80 fa 6b ret
1c: 00 00 fe 2f unop
while gcc-5.3.0 -O2 -mcpu=ev67 emits
0000000000000000 <f2i>:
0: f0 ff de 23 lda sp,-16(sp)
4: 00 00 1e 9a sts $f16,0(sp)
8: 00 00 1e a0 ldl v0,0(sp)
c: 10 00 de 23 lda sp,16(sp)
10: 01 80 fa 6b ret
14: 00 00 fe 2f unop
18: 1f 04 ff 47 nop
1c: 00 00 fe 2f unop
0000000000000020 <f2l>:
20: 01 0f 1f 72 ftois $f16,t0
24: 20 f6 21 48 zapnot t0,0xf,v0
28: 01 80 fa 6b ret
2c: 00 00 fe 2f unop
In fact, the alpha architecture reference says that ftois is exactly equivalent
to an sts/ldl sequence.
f2i should have used ftois, as with gcc-4.9.3.
More information about the Gcc-bugs
mailing list