Fix comparison mode in simplify_ternary_operation
authorTom de Vries <tom@codesourcery.com>
Mon, 20 Nov 2017 08:20:35 +0000 (08:20 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Mon, 20 Nov 2017 08:20:35 +0000 (08:20 +0000)
2017-11-20  Tom de Vries  <tom@codesourcery.com>

PR rtl-optimization/82020
* simplify-rtx.c (simplify_ternary_operation): Fix comparison mode of
IF_THEN_ELSE condition.

From-SVN: r254944

gcc/ChangeLog
gcc/simplify-rtx.c

index 5ce981d087194102faaa4ed6b07167076ecbe7de..827ee608029b8ccc49302eefc55a794bd42a5da0 100644 (file)
@@ -1,3 +1,9 @@
+2017-11-20  Tom de Vries  <tom@codesourcery.com>
+
+       PR rtl-optimization/82020
+       * simplify-rtx.c (simplify_ternary_operation): Fix comparison mode of
+       IF_THEN_ELSE condition.
+
 2017-11-19  Jeff Law  <law@redhat.com>
 
        * tree-ssa-dom.c (record_equivalences_from_phis): Fix handling
index e1a16a46a4c5b426af6c12c9764d819c99b6011c..36a2e3702937512dfcca6798e190eccfbad5e66a 100644 (file)
@@ -5651,8 +5651,6 @@ simplify_ternary_operation (enum rtx_code code, machine_mode mode,
                                              XEXP (op0, 0), XEXP (op0, 1));
            }
 
-         if (cmp_mode == VOIDmode)
-           cmp_mode = op0_mode;
          temp = simplify_relational_operation (GET_CODE (op0), op0_mode,
                                                cmp_mode, XEXP (op0, 0),
                                                XEXP (op0, 1));