On Thu, Jun 06, 2019 at 10:12:57AM +0100, Richard Earnshaw (lists) wrote: > On 06/06/2019 00:46, Segher Boessenkool wrote: > > On Wed, Jun 05, 2019 at 05:02:53PM -0600, Jeff Law wrote: > >> On 6/2/19 6:28 AM, Segher Boessenkool wrote: > >>> Do you have a testcase for this? I wonder if it would be better handled > >>> during combine, and what that then tried; or perhaps these opportunities > >>> are created later, making a peephole a more attractive solution. > >> We have two independent insns with no output/true dependency between > >> them. So there's really not anything for combine to do here. > > > > op0 := op1; > > CC := op0 cmp 0; > > > > That's a perfectly fine dependency I think? > > But if op0 isn't dead after the second insn, combine won't consider it, > right? Even though in this case the combination would be safe as we > still produce op0.
That doesn't stop combine from considering it. It does make that first SET survive, so that you get a parallel as final insn. It may not like that one of the parallel SETs is just a move. Needs testcase :-) Segher