@@ -0,0 +1,14 @@
+/* PR tree-optimization/71994 */
+/* { dg-do compile } */
+int om, h6;
+
+void eo (void)
+{
+ const int tl = 1;
+ int ln;
+
+ h6 = (om + tl) > 0;
+ ln = om && (om & h6);
+ h6 = om;
+ om = ln < h6;
+}
@@ -3520,10 +3520,10 @@ maybe_optimize_range_tests (gimple *stmt)
push into ops the individual range test arguments
of the bitwise or resp. and, recursively. */
if (TREE_CODE (rhs) == SSA_NAME
- && !get_ops (rhs, code, &ops,
- loop_containing_stmt (stmt))
&& (TREE_CODE_CLASS (gimple_assign_rhs_code (stmt))
!= tcc_comparison)
+ && !get_ops (rhs, code, &ops,
+ loop_containing_stmt (stmt))
&& has_single_use (rhs))
{
/* Otherwise, push the _234 range test itself. */