diff options
author | Eikansh Gupta <quic_eikagupt@quicinc.com> | 2024-11-11 17:06:04 +0530 |
---|---|---|
committer | Andrew Pinski <quic_apinski@quicinc.com> | 2024-11-14 00:37:33 -0800 |
commit | 879c1619ab5a708514cbb1f3754e59f30ba29e6c (patch) | |
tree | ee43624a03c8bb32874baf428bd04c2516947dd9 /gcc/cfgexpand.cc | |
parent | 6d85a0bc2e09221bdb412bc47aefbcd10c546fd5 (diff) | |
download | gcc-879c1619ab5a708514cbb1f3754e59f30ba29e6c.zip gcc-879c1619ab5a708514cbb1f3754e59f30ba29e6c.tar.gz gcc-879c1619ab5a708514cbb1f3754e59f30ba29e6c.tar.bz2 |
MATCH: Simplify `a rrotate (32-b) -> a lrotate b` [PR109906]
The pattern `a rrotate (32-b)` should be optimized to `a lrotate b`.
The same is also true for `a lrotate (32-b)`. It can be optimized to
`a rrotate b`.
This patch adds following patterns:
a rrotate (32-b) -> a lrotate b
a lrotate (32-b) -> a rrotate b
Bootstrapped and tested on x86_64-linux-gnu with no regressions.
PR tree-optimization/109906
gcc/ChangeLog:
* match.pd (a rrotate (32-b) -> a lrotate b): New pattern
(a lrotate (32-b) -> a rrotate b): New pattern
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/pr109906.c: New test.
Signed-off-by: Eikansh Gupta <quic_eikagupt@quicinc.com>
Diffstat (limited to 'gcc/cfgexpand.cc')
0 files changed, 0 insertions, 0 deletions