aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-loop-interchange.cc
diff options
context:
space:
mode:
authorAndrew Pinski <apinski@marvell.com>2023-09-16 03:27:26 +0000
committerAndrew Pinski <apinski@marvell.com>2023-09-18 16:12:53 +0000
commit0fb828af75732d39c644fd145c29d41ca14b8cb1 (patch)
tree71355c5553c4143fa6a0449f8982d9a0a566629d /gcc/gimple-loop-interchange.cc
parent0db533114235539199f6698d8d52c5101107567e (diff)
downloadgcc-0fb828af75732d39c644fd145c29d41ca14b8cb1.zip
gcc-0fb828af75732d39c644fd145c29d41ca14b8cb1.tar.gz
gcc-0fb828af75732d39c644fd145c29d41ca14b8cb1.tar.bz2
MATCH: Add simplifications of `(a == CST) & a`
`(a == CST) & a` can be either simplified to simplying `a == CST` or 0 depending on the first bit of the CST. This is an extension of the already pattern of `X & !X` and allows us to remove the 2 xfails on gcc.dg/binop-notand1a.c and gcc.dg/binop-notand4a.c. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. PR tree-optimization/111431 gcc/ChangeLog: * match.pd (`(a == CST) & a`): New pattern. gcc/testsuite/ChangeLog: * gcc.dg/binop-notand1a.c: Remove xfail. * gcc.dg/binop-notand4a.c: Likewise. * gcc.c-torture/execute/pr111431-1.c: New test. * gcc.dg/binop-andeq1.c: New test. * gcc.dg/binop-andeq2.c: New test. * gcc.dg/binop-notand7.c: New test. * gcc.dg/binop-notand7a.c: New test.
Diffstat (limited to 'gcc/gimple-loop-interchange.cc')
0 files changed, 0 insertions, 0 deletions