https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71119
Bug ID: 71119 Summary: [4.9 Regression] ftoit instruction not emitted for double -> long bitcast Product: gcc Version: 4.9.3 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 38491 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38491&action=edit ftoit.c For the attached ftoit.c, gcc-4.8.5 -O2 -mcpu=ev67 emits 0000000000000000 <f2i>: 0: 00 0e 1f 72 ftoit $f16,v0 4: 00 00 e0 43 sextl v0,v0 8: 01 80 fa 6b ret c: 00 00 fe 2f unop 0000000000000010 <f2l>: 10: 00 0e 1f 72 ftoit $f16,v0 14: 01 80 fa 6b ret 18: 1f 04 ff 47 nop 1c: 00 00 fe 2f unop while gcc-4.9.3/gcc-5.3.0 -O2 -mcpu=ev67 emits 0000000000000000 <f2i>: 0: 00 0e 1f 72 ftoit $f16,v0 4: 00 00 e0 43 sextl v0,v0 8: 01 80 fa 6b ret c: 00 00 fe 2f unop 0000000000000010 <f2l>: 10: f0 ff de 23 lda sp,-16(sp) 14: 00 00 1e 9e stt $f16,0(sp) 18: 00 00 1e a4 ldq v0,0(sp) 1c: 10 00 de 23 lda sp,16(sp) 20: 01 80 fa 6b ret 24: 00 00 fe 2f unop 28: 1f 04 ff 47 nop 2c: 00 00 fe 2f unop In fact, the alpha architecture reference says that ftoit is exactly equivalent to an stt/ldq sequence. f2l should have used ftoit, as with gcc-4.8.5.