diff options
author | Sam Feifer <sfeifer@redhat.com> | 2022-08-03 10:31:03 -0400 |
---|---|---|
committer | Sam Feifer <sfeifer@redhat.com> | 2022-08-04 09:35:14 -0400 |
commit | 39579ba8de9d91eafcc4943259b154a9e66538f1 (patch) | |
tree | 59324467d7729646d3378909ac164539d385ff93 /gcc/tree-ssa-phiopt.cc | |
parent | d8552eaddc40b72461158e56b5db8709f2eb21ed (diff) | |
download | gcc-39579ba8de9d91eafcc4943259b154a9e66538f1.zip gcc-39579ba8de9d91eafcc4943259b154a9e66538f1.tar.gz gcc-39579ba8de9d91eafcc4943259b154a9e66538f1.tar.bz2 |
match.pd: Add bitwise and pattern [PR106243]
This patch adds a new optimization to match.pd. The pattern, -x & 1,
now gets simplified to x & 1, reducing the number of instructions
produced.
This patch also adds tests for the optimization rule.
Bootstrapped/regtested on x86_64-pc-linux-gnu.
PR tree-optimization/106243
gcc/ChangeLog:
* match.pd (-x & 1): New simplification.
gcc/testsuite/ChangeLog:
* gcc.dg/pr106243-1.c: New test.
* gcc.dg/pr106243.c: New test.
Diffstat (limited to 'gcc/tree-ssa-phiopt.cc')
0 files changed, 0 insertions, 0 deletions