Now that MIN/MAX can sometimes be transformed into BIT_AND/BIT_IOR,
we should allow BIT_AND and BIT_IOR in the early phiopt.
Also we produce BIT_AND/BIT_IOR for things like `bool0 ? bool1 : 0`
which seems like a good thing to allow early on too.
OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.
gcc/ChangeLog:
* tree-ssa-phiopt.cc (phiopt_early_allow): Allow
BIT_AND_EXPR and BIT_IOR_EXPR.
---
gcc/tree-ssa-phiopt.cc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gcc/tree-ssa-phiopt.cc b/gcc/tree-ssa-phiopt.cc
index 54706f4c7e7..7e63fb115db 100644
--- a/gcc/tree-ssa-phiopt.cc
+++ b/gcc/tree-ssa-phiopt.cc
@@ -469,6 +469,9 @@ phiopt_early_allow (gimple_seq &seq, gimple_match_op &op)
{
case MIN_EXPR:
case MAX_EXPR:
+ /* MIN/MAX could be convert into these. */
+ case BIT_IOR_EXPR:
+ case BIT_AND_EXPR:
case ABS_EXPR:
case ABSU_EXPR:
case NEGATE_EXPR:
--
2.31.1