Re: [PATCH 2/2] PHI-OPT: speed up value_replacement slightly

2024-04-30 Thread Richard Biener
On Sun, Apr 28, 2024 at 8:31 AM Andrew Pinski wrote: > > This adds a few early outs to value_replacement that I noticed > while rewriting this to use match-and-simplify but could be committed > seperately. > * virtual operands won't change so return early for them > * special case `A ? B : B` as t

[PATCH 2/2] PHI-OPT: speed up value_replacement slightly

2024-04-27 Thread Andrew Pinski
This adds a few early outs to value_replacement that I noticed while rewriting this to use match-and-simplify but could be committed seperately. * virtual operands won't change so return early for them * special case `A ? B : B` as that is already just `B` Also moves the check for NE/EQ earlier as