aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-phiopt.cc
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@gmail.com>2023-10-23 12:46:34 -0700
committerAndrew Pinski <pinskia@gmail.com>2023-10-24 04:16:12 -0700
commit452c4f32373feb6b2c1c1d91b5ec6fe7e7ce0000 (patch)
treee0ed14c1ae8f41626223485cbb873eaf9d24fc9b /gcc/tree-ssa-phiopt.cc
parent3e901615ff16547aaf376e7762d417b0b4d98619 (diff)
downloadgcc-452c4f32373feb6b2c1c1d91b5ec6fe7e7ce0000.zip
gcc-452c4f32373feb6b2c1c1d91b5ec6fe7e7ce0000.tar.gz
gcc-452c4f32373feb6b2c1c1d91b5ec6fe7e7ce0000.tar.bz2
match: Fix the `popcnt(a&b) + popcnt(a|b)` pattern for types [PR111913]
So this pattern needs a little help on the gimple side of things to know what the type popcount should be. For most builtins, the type is the same as the input but popcount and others are not. And when using it with another outer expression, genmatch needs some slight help to know that the return type was type rather than the argument type. Bootstrapped and tested on x86_64-linux-gnu with no regressions. PR tree-optimization/111913 gcc/ChangeLog: * match.pd (`popcount(X&Y) + popcount(X|Y)`): Add the resulting type for popcount. gcc/testsuite/ChangeLog: * gcc.c-torture/compile/fold-popcount-1.c: New test. * gcc.dg/fold-popcount-8a.c: New test.
Diffstat (limited to 'gcc/tree-ssa-phiopt.cc')
0 files changed, 0 insertions, 0 deletions