aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-expr.cc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2022-04-11 13:36:53 +0200
committerRichard Biener <rguenther@suse.de>2022-05-23 11:30:39 +0200
commit68e0063397ba820e71adc220b2da0581dce29ffa (patch)
tree171b9d384db6af4abe9509eadbfd1fc950bf0e15 /gcc/gimple-expr.cc
parent49d1a2f91325fa8cc011149e27e5093a988b3a49 (diff)
downloadgcc-68e0063397ba820e71adc220b2da0581dce29ffa.zip
gcc-68e0063397ba820e71adc220b2da0581dce29ffa.tar.gz
gcc-68e0063397ba820e71adc220b2da0581dce29ffa.tar.bz2
Force the selection operand of a GIMPLE COND_EXPR to be a register
This goes away with the selection operand allowed to be a GENERIC tcc_comparison tree. It keeps those for vectorizer pattern recog, those are short lived and removing this instance is a bigger task. The patch doesn't yet remove dead code and functionality, that's left for a followup. Instead the patch makes sure to produce valid GIMPLE IL and continue to optimize COND_EXPRs where the previous IL allowed and the new IL showed regressions in the testsuite. 2022-05-16 Richard Biener <rguenther@suse.de> * gimple-expr.cc (is_gimple_condexpr): Equate to is_gimple_val. * gimplify.cc (gimplify_pure_cond_expr): Gimplify the condition as is_gimple_val. * gimple-fold.cc (valid_gimple_rhs_p): Simplify. * tree-cfg.cc (verify_gimple_assign_ternary): Likewise. * gimple-loop-interchange.cc (loop_cand::undo_simple_reduction): Build the condition of the COND_EXPR separately. * tree-ssa-loop-im.cc (move_computations_worker): Likewise. * tree-vect-generic.cc (expand_vector_condition): Likewise. * tree-vect-loop.cc (vect_create_epilog_for_reduction): Likewise. * vr-values.cc (simplify_using_ranges::simplify): Likewise. * tree-vect-patterns.cc: Add comment indicating we are building invalid COND_EXPRs and why. * omp-expand.cc (expand_omp_simd): Gimplify the condition to the COND_EXPR separately. (expand_omp_atomic_cas): Note part that should be unreachable now. * tree-ssa-forwprop.cc (forward_propagate_into_cond): Adjust condition for valid replacements. * tree-if-conv.cc (predicate_bbs): Simulate previous re-folding of the condition in folded COND_EXPRs which is necessary because of unfolded GIMPLE_CONDs in the IL as in for example gcc.dg/fold-bopcond-1.c. * gimple-range-gori.cc (gori_compute::condexpr_adjust): Handle that the comparison is now in the def stmt of the select operand. Required by gcc.dg/pr104526.c. * gcc.dg/gimplefe-27.c: Adjust. * gcc.dg/gimplefe-45.c: Likewise. * gcc.dg/pr101145-2.c: Likewise. * gcc.dg/pr98211.c: Likewise. * gcc.dg/torture/pr89595.c: Likewise. * gcc.dg/tree-ssa/divide-7.c: Likewise. * gcc.dg/tree-ssa/ssa-lim-12.c: Likewise.
Diffstat (limited to 'gcc/gimple-expr.cc')
-rw-r--r--gcc/gimple-expr.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/gimple-expr.cc b/gcc/gimple-expr.cc
index 5d10c24..09eac80 100644
--- a/gcc/gimple-expr.cc
+++ b/gcc/gimple-expr.cc
@@ -622,7 +622,7 @@ is_gimple_condexpr (tree t)
{
/* Always split out _Complex type compares since complex lowering
doesn't handle this case. */
- return is_gimple_condexpr_1 (t, true, false);
+ return is_gimple_val (t);
}
/* Like is_gimple_condexpr, but does not allow T to trap. */