aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorAndrew Pinski <quic_apinski@quicinc.com>2024-08-12 17:37:32 -0700
committerAndrew Pinski <quic_apinski@quicinc.com>2024-08-20 06:59:15 -0700
commiteface71c18caea3009ddc1ac624cb41647e9d5c4 (patch)
tree4e270e8bbf57942f4290c026be6df17ae459a063 /libcpp
parentb73373520f0ed5d131d2cd6ee9078939a98d7a0d (diff)
downloadgcc-eface71c18caea3009ddc1ac624cb41647e9d5c4.zip
gcc-eface71c18caea3009ddc1ac624cb41647e9d5c4.tar.gz
gcc-eface71c18caea3009ddc1ac624cb41647e9d5c4.tar.bz2
Match: Add pattern for `(a ? b : 0) | (a ? 0 : c)` into `a ? b : c` [PR103660]
This adds a pattern to convert `(a ? b : 0) | (a ? 0 : c)` into `a ? b : c` which is simplier. It adds both for cond and vec_cond; even though vec_cond is handled via a different pattern currently but requires extra steps for matching so this should be slightly faster. Also handle it for xor and plus too since those can be handled the same way. Bootstrapped and tested on x86_64-linux-gnu with no regressions. PR tree-optimization/103660 gcc/ChangeLog: * match.pd (`(a ? b : 0) | (a ? 0 : c)`): New pattern. gcc/testsuite/ChangeLog: * g++.dg/tree-ssa/pr103660-4.C: New test. * gcc.dg/tree-ssa/pr103660-4.c: New test. Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions