]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/tree-ssa-ifcombine.c
PR tree-optimization/92115
[thirdparty/gcc.git] / gcc / tree-ssa-ifcombine.c
index 90d8bb5e9e76ad88eddb9645258d7e5630c8132b..21c1b0e8918219252740a10b83d99dc4da05fb08 100644 (file)
@@ -599,6 +599,12 @@ ifcombine_ifandif (basic_block inner_cond_bb, bool inner_inv,
       t = canonicalize_cond_expr_cond (t);
       if (!t)
        return false;
+      if (!is_gimple_condexpr_for_cond (t))
+       {
+         gsi = gsi_for_stmt (inner_cond);
+         t = force_gimple_operand_gsi_1 (&gsi, t, is_gimple_condexpr_for_cond,
+                                         NULL, true, GSI_SAME_STMT);
+       }
       gimple_cond_set_condition_from_tree (inner_cond, t);
       update_stmt (inner_cond);