tree-optimization: [PR109702] MATCH: Fix a ? func(a) : N patterns
commit8702ab1456eee07d07ac1a8bc005c690cf6dbcf0
authorAndrew Pinski <apinski@marvell.com>
Tue, 2 May 2023 18:03:02 +0000 (2 11:03 -0700)
committerAndrew Pinski <apinski@marvell.com>
Tue, 2 May 2023 21:46:38 +0000 (2 14:46 -0700)
tree2cd109c6c13221725830d4245bcbdb0037b96a35
parent7cc33d12dca84befde69259a17fab8224e2e4025
tree-optimization: [PR109702] MATCH: Fix a ? func(a) : N patterns

I accidently messed up these patterns so the comparison
against 0 and the arguments was not matching up when they
need to be.

I committed this as obvious after a bootstrap/test on x86_64-linux-gnu

PR tree-optimization/109702

gcc/ChangeLog:

* match.pd: Fix "a != 0 ? FUNC(a) : CST" patterns
for FUNC of POPCOUNT BSWAP FFS PARITY CLZ and CTZ.

gcc/testsuite/ChangeLog:

* gcc.dg/tree-ssa/phi-opt-25b.c: New test.
gcc/match.pd
gcc/testsuite/gcc.dg/tree-ssa/phi-opt-25b.c [new file with mode: 0644]