https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61446
Bug ID: 61446 Summary: [4.10 Regression]: ICE in copyprop_hardreg_forward_1, at regcprop.c with -O2 -m32 -march=corei7 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: ubizjak at gmail dot com Following testcase: --cut here-- unsigned long long __fixunssfdi (float a) { const double dfa = a; const unsigned int hi = dfa / 0x1p32f; const unsigned int lo = dfa - (double) hi * 0x1p32f; return ((unsigned long long) hi << (4 * (8))) | lo; } --cut here-- ICEs on x86_64-pc-linux-gnu with "-O2 -m32 -march=corei7": ./cc1 -O2 -m32 -march=corei7 ree.c __fixunssfdi Analyzing compilation unit Performing interprocedural optimizations <*free_lang_data> <visibility> <early_local_cleanups> <*free_inline_summary> <whole-program> <profile_estimate> <devirt> <cp> <inline> <pure-const> <static-var> <comdats>Assembling functions: __fixunssfdi ree.c: In function ‘__fixunssfdi’: ree.c:11:1: error: insn does not satisfy its constraints: } ^ (insn 54 11 47 2 (set (reg:DI 0 ax) (reg:DI 21 xmm0)) ree.c:7 89 {*movdi_internal} (expr_list:REG_UNUSED (reg:DI 0 ax) (nil))) ree.c:11:1: internal compiler error: in copyprop_hardreg_forward_1, at regcprop.c:776 0x96bec8 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) /home/uros/gcc-svn/trunk/gcc/rtl-error.c:109 0x96beef _fatal_insn_not_found(rtx_def const*, char const*, int, char const*) /home/uros/gcc-svn/trunk/gcc/rtl-error.c:120 0x9462a4 copyprop_hardreg_forward_1 /home/uros/gcc-svn/trunk/gcc/regcprop.c:776 0x94645a execute /home/uros/gcc-svn/trunk/gcc/regcprop.c:1264 Please submit a full bug report, ... _.split2 pass generates: ... (insn 11 45 46 2 (set (reg/v:SI 0 ax [orig:85 hi ] [85]) (reg:SI 2 cx [99])) ree.c:7 90 {*movsi_internal} (nil)) (insn 46 11 47 2 (set (reg:DI 21 xmm0 [118]) (zero_extend:DI (reg/v:SI 0 ax [orig:85 hi ] [85]))) ree.c:10 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])) ree.c:10 89 {*movdi_internal} (nil)) (insn 48 47 13 2 (set (reg:DF 9 st(1) [orig:101 D.1856 ] [101]) (float:DF (mem/c:DI (reg/f:SI 7 sp) [0 S8 A64]))) ree.c:10 206 {*floatdidf2_i387} (nil)) ... and this sequence is transformed in _.ree pass to: ... (insn 11 45 54 2 (set (reg:DI 21 xmm0) (zero_extend:DI (reg:SI 2 cx [99]))) ree.c:7 133 {*zero_extendsidi2} (nil)) (insn 54 11 47 2 (set (reg:DI 0 ax) (reg:DI 21 xmm0)) ree.c:7 -1 (nil)) (insn 47 54 48 2 (set (mem/c:DI (reg/f:SI 7 sp) [0 S8 A64]) (reg:DI 21 xmm0 [118])) ree.c:10 89 {*movdi_internal} (nil)) (insn 48 47 13 2 (set (reg:DF 9 st(1) [orig:101 D.1856 ] [101]) (float:DF (mem/c:DI (reg/f:SI 7 sp) [0 S8 A64]))) ree.c:10 206 {*floatdidf2_i387} (nil)) ... (insn 54) is the problematic instruction.