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

--- Comment #4 from Bernd Schmidt <bernds at gcc dot gnu.org> ---
(In reply to Zdenek Sojka from comment #0)
> Trying 27, 28 -> 33:
> ...
> Successfully matched this instruction:
> (set (reg:QI 128 [ _6 ])
>     (plus:QI (subreg:QI (reg:DI 111 [ p1D.1798 ]) 0)
>         (subreg:QI (reg/v:DI 100 [ bD.1802 ]) 0)))
> Successfully matched this instruction:
> (set (reg:QI 123 [ p1D.1798 ])
>     (plus:QI (reg:QI 128 [ _6 ])
>         (subreg:QI (reg:DI 92 [ _6 ]) 0)))
> allowing combination of insns 27, 28 and 33

It looks like this combination introduces a new use of reg 100 into insn 28 (it
was previously used in insn 33). Thus, it becomes the first use of reg 100, but
the other use in insn 32 still has the LOG_LINKS pointer, allowing the second
combination which makes the code incorrect.

This looks like a pretty serious hole in the combiner. Not sure yet how best to
fix it.

Reply via email to