[Bug target/61423] Incorrect conversion from unsigned int to floating point
ubizjak at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Jun 6 15:37:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61423
--- Comment #5 from Uroš Bizjak <ubizjak at gmail dot com> ---
Created attachment 32903
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32903&action=edit
Testcase that fails in REE pass
This testcase fails with patched gcc in REE pass:
cc1 -O2 -m32 -march=corei7 libgcc2.i
/home/uros/gcc-svn/trunk/libgcc/libgcc2.c: In function ‘__fixunssfdi’:
/home/uros/gcc-svn/trunk/libgcc/libgcc2.c:1492:1: error: insn does not satisfy
its constraints:
}
^
(insn 54 11 47 2 (set (reg:DI 0 ax)
(reg:DI 21 xmm0)) /home/uros/gcc-svn/trunk/libgcc/libgcc2.c:1444 89
{*movdi_internal}
(expr_list:REG_UNUSED (reg:DI 0 ax)
(nil)))
/home/uros/gcc-svn/trunk/libgcc/libgcc2.c:1492:1: internal compiler error: in
copyprop_hardreg_forward_1, at regcprop.c:776
...
_split2 pass produces correct sequence:
(insn 46 11 47 2 (set (reg:DI 21 xmm0 [118])
(zero_extend:DI (reg/v:SI 0 ax [orig:85 hi ] [85])))
/home/uros/gcc-svn/trunk/libgcc/libgcc2.c:1452 133 {*zero_extendsidi2}
(nil))
(insn 47 46 48 2 (set (mem/c:DI (reg/f:SI 7 sp) [0 S8 A64])
(reg:DI 21 xmm0 [118])) /home/uros/gcc-svn/trunk/libgcc/libgcc2.c:1452
89 {*movdi_internal}
(nil))
(insn 48 47 13 2 (set (reg:DF 9 st(1) [orig:101 D.6895 ] [101])
(float:DF (mem/c:DI (reg/f:SI 7 sp) [0 S8 A64])))
/home/uros/gcc-svn/trunk/libgcc/libgcc2.c:1452 206 {*floatdidf2_i387}
(nil))
and _ree pass converts this to:
(insn 11 45 54 2 (set (reg:DI 21 xmm0)
(zero_extend:DI (reg:SI 2 cx [99])))
/home/uros/gcc-svn/trunk/libgcc/libgcc2.c:1444 133 {*zero_extendsidi2}
(nil))
(insn 54 11 47 2 (set (reg:DI 0 ax)
(reg:DI 21 xmm0)) /home/uros/gcc-svn/trunk/libgcc/libgcc2.c:1444 -1
(nil))
(insn 47 54 48 2 (set (mem/c:DI (reg/f:SI 7 sp) [0 S8 A64])
(reg:DI 21 xmm0 [118])) /home/uros/gcc-svn/trunk/libgcc/libgcc2.c:1452
89 {*movdi_internal}
(nil))
(insn 48 47 13 2 (set (reg:DF 9 st(1) [orig:101 D.6895 ] [101])
(float:DF (mem/c:DI (reg/f:SI 7 sp) [0 S8 A64])))
/home/uros/gcc-svn/trunk/libgcc/libgcc2.c:1452 206 {*floatdidf2_i387}
(nil))
Please note ivalid (insn 54).
More information about the Gcc-bugs
mailing list