aboutsummaryrefslogtreecommitdiff
path: root/gcc/d/expr.cc
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@gmail.com>2023-10-27 19:23:52 -0700
committerAndrew Pinski <pinskia@gmail.com>2023-10-30 19:15:25 -0700
commit541b754c77ab806a9dae9bbaae69722e2c36f0f0 (patch)
tree6c8b211cd6320eaa341e557604401896ad75cd30 /gcc/d/expr.cc
parent598fdb5290dcf76ef23e993409e22f1512ff835a (diff)
downloadgcc-541b754c77ab806a9dae9bbaae69722e2c36f0f0.zip
gcc-541b754c77ab806a9dae9bbaae69722e2c36f0f0.tar.gz
gcc-541b754c77ab806a9dae9bbaae69722e2c36f0f0.tar.bz2
MATCH: Add some more value_replacement simplifications to match
This moves a few more value_replacements simplifications to match. /* a == 1 ? b : a * b -> a * b */ /* a == 1 ? b : b / a -> b / a */ /* a == -1 ? b : a & b -> a & b */ Also adds a testcase to show can we catch these where value_replacement would not (but other passes would). Bootstrapped and tested on x86_64-linux-gnu with no regressions. gcc/ChangeLog: * match.pd (`a == 1 ? b : a OP b`): New pattern. (`a == -1 ? b : a & b`): New pattern. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/phi-opt-value-4.c: New test.
Diffstat (limited to 'gcc/d/expr.cc')
0 files changed, 0 insertions, 0 deletions