https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106751

Segher Boessenkool <segher at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |segher at gcc dot gnu.org

--- Comment #7 from Segher Boessenkool <segher at gcc dot gnu.org> ---
For me (powerpc64-linux) it fails with

===
106751.c:10:1: error: flow control insn inside a basic block
(jump_insn 6 3 13 2 (parallel [
            (asm_operands/v ("") ("") 0 []
                 []
                 [
                    (label_ref:DI 9)
                ] 106751.c:5)
            (clobber (reg:SI 98 ca))
        ]) "106751.c":5:3 -1
     (expr_list:REG_UNUSED (reg:SI 98 ca)
        (nil))
 -> 9)
during RTL pass: loop2_invariant
===

That pass did
===
Set in insn 13 is invariant (0), cost 4, depends on 
Decided to move invariant 0 -- gain 4
Invariant 0 moved without introducing a new temporary register
changing bb of uid 13
  from 3 to 2
===

It moved the insn after a jump_insn, not a good idea:

===
(jump_insn 6 3 13 2 (parallel [
            (asm_operands/v ("") ("") 0 []
                 []
                 [
                    (label_ref:DI 9)
                ] 106751.c:5)
            (clobber (reg:SI 98 ca))
        ]) "106751.c":5:3 -1
     (expr_list:REG_UNUSED (reg:SI 98 ca)
        (nil))
 -> 9)
(insn 13 6 9 2 (set (reg:SI 119)
        (const_int 0 [0])) "106751.c":9:28 562 {*movsi_internal1}
     (nil))
;;  succ:       3 [always]  count:10631108 (estimated locally)
===

Maybe it does not see this is an unconditional jump insn?

Reply via email to