aboutsummaryrefslogtreecommitdiff
path: root/gcc/omp-simd-clone.cc
diff options
context:
space:
mode:
authorSam Feifer <sfeifer@redhat.com>2022-07-29 09:44:48 -0400
committerSam Feifer <sfeifer@redhat.com>2022-08-01 09:01:53 -0400
commit388fbbd895e72669909173c3003ae65c6483a3c2 (patch)
tree6f06ba7584c2bfc8a744d1fd3fddb270e450e66c /gcc/omp-simd-clone.cc
parent71f068a9b3332a2179dfc807cf9138f691d77461 (diff)
downloadgcc-388fbbd895e72669909173c3003ae65c6483a3c2.zip
gcc-388fbbd895e72669909173c3003ae65c6483a3c2.tar.gz
gcc-388fbbd895e72669909173c3003ae65c6483a3c2.tar.bz2
match.pd: Add new division pattern [PR104992]
This patch fixes a missed optimization in match.pd. It takes the pattern, x / y * y == x, and optimizes it to x % y == 0. This produces fewer instructions. This simplification does not happen for complex types. This patch also adds tests for the optimization rule. Bootstrapped/regtested on x86_64-pc-linux-gnu. PR tree-optimization/104992 gcc/ChangeLog: * match.pd (x / y * y == x): New simplification. gcc/testsuite/ChangeLog: * g++.dg/pr104992-1.C: New test. * gcc.dg/pr104992.c: New test.
Diffstat (limited to 'gcc/omp-simd-clone.cc')
0 files changed, 0 insertions, 0 deletions