[Bug rtl-optimization/85300] [6/7/8 Regression] ICE in exact_int_to_float_conversion_p, at simplify-rtx.c:895
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Apr 9 17:28:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85300
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |segher at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
This breaks during combine.
We have:
(gdb) p debug_rtx (i3)
(insn 68 67 69 7 (set (reg:SI 89 [ _3 ])
(fix:SI (reg/v:SF 90 [ a ]))) "pr85300.c":4 174 {fix_truncsfsi_sse}
(expr_list:REG_DEAD (reg/v:SF 90 [ a ])
(nil)))
(gdb) p debug_rtx (i2)
(insn 63 62 64 7 (set (reg/v:SF 90 [ a ])
(float:SF (reg:SI 88 [ _2 ]))) "pr85300.c":8 203 {*floatsisf2_mixed}
(expr_list:REG_DEAD (reg:SI 88 [ _2 ])
(nil)))
(gdb) p debug_rtx (i1)
(insn 62 61 63 7 (set (reg:SI 88 [ _2 ])
(const_int 256 [0x100])) "pr85300.c":8 86 {*movsi_internal}
(nil))
and first subst it so that we get:
(set (reg:SI 89 [ _3 ])
(fix:SI (float:SF (reg:SI 88 [ _2 ]))))
and then subst r88 for 256 and get:
(set (reg:SI 89 [ _3 ])
(const_int 256 [0x100]))
That is fine. But, during that substitution we also modify the i2 pattern,
making it invalid:
(insn 63 62 64 7 (set (reg/v:SF 90 [ a ])
(float:SF (const_int 256 [0x100]))) "pr85300.c":8 203
{*floatsisf2_mixed}
(expr_list:REG_DEAD (reg:SI 88 [ _2 ])
(nil)))
because the FLOAT rtx was shared between PATTERN (i2) and newpat.
More information about the Gcc-bugs
mailing list