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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 52735
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52735&action=edit
gcc12-pr105123.patch

Untested fix.
The problem was expansion of a (dead) statement
  _1 = {u.0_3, u.0_3, u.0_3, u.0_3};
where the expansion overwrote the pseudo containing u.0_3:
(insn 10 9 11 (parallel [
            (set (reg:SI 83 [ u.0_3 ])
                (ashift:SI (reg:SI 83 [ u.0_3 ])
                    (const_int 16 [0x10])))
            (clobber (reg:CC 17 flags))
        ]) "pr105123.c":6:31 -1
     (nil))

(insn 11 10 12 (parallel [
            (set (reg:SI 83 [ u.0_3 ])
                (ior:SI (reg:SI 83 [ u.0_3 ])
                    (reg:SI 83 [ u.0_3 ])))
            (clobber (reg:CC 17 flags))
        ]) "pr105123.c":6:31 -1
     (nil))

(insn 12 11 13 (parallel [
            (set (reg:SI 83 [ u.0_3 ])
                (ashift:SI (reg:SI 83 [ u.0_3 ])
                    (const_int 16 [0x10])))
            (clobber (reg:CC 17 flags))
        ]) "pr105123.c":6:31 -1
     (nil))

(insn 13 12 14 (parallel [
            (set (reg:SI 83 [ u.0_3 ])
                (ior:SI (reg:SI 83 [ u.0_3 ])
                    (reg:SI 83 [ u.0_3 ])))
            (clobber (reg:CC 17 flags))
        ]) "pr105123.c":6:31 -1
     (nil))

(insn 14 13 15 (clobber (reg:V4HI 110)) "pr105123.c":6:31 -1
     (nil))

(insn 15 14 16 (set (subreg:SI (reg:V4HI 110) 0)
        (reg:SI 83 [ u.0_3 ])) "pr105123.c":6:31 -1
     (nil))

(insn 16 15 17 (set (subreg:SI (reg:V4HI 110) 4)
        (reg:SI 83 [ u.0_3 ])) "pr105123.c":6:31 -1
     (nil))

Reply via email to