summaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorSegher Boessenkool <segher@kernel.crashing.org>2018-09-19 19:38:11 +0200
committerSegher Boessenkool <segher@gcc.gnu.org>2018-09-19 19:38:11 +0200
commitebdf17cb73df8e9759c9fd6d0afc0329c0072cd8 (patch)
tree741490327756b0c522aed4b2649b87ae85571e1b /gcc/combine.c
parentfce33808678df40cce69c15141926342f8a6f47e (diff)
combine: Use correct mode in new comparison (PR86902)
This code in try_combine uses the wrong mode. This fails (with RTL checking) in trunk, but not in any released branches. PR rtl-optimization/86902 * combine.c (try_combine): When changing the CC mode used, don't change an unrelated mode in other_insn to that new CC mode. From-SVN: r264426
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index a2649b6d5a1..60cfe972aaf 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -3310,7 +3310,7 @@ try_combine (rtx_insn *i3, rtx_insn *i2, rtx_insn *i1, rtx_insn *i0,
{
/* Replace cc_use_loc with entire new RTX. */
SUBST (*cc_use_loc,
- gen_rtx_fmt_ee (compare_code, compare_mode,
+ gen_rtx_fmt_ee (compare_code, GET_MODE (*cc_use_loc),
newpat_dest, const0_rtx));
undobuf.other_insn = cc_use_insn;
}
@@ -3319,7 +3319,7 @@ try_combine (rtx_insn *i3, rtx_insn *i2, rtx_insn *i1, rtx_insn *i0,
/* Just replace the CC reg with a new mode. */
SUBST (XEXP (*cc_use_loc, 0), newpat_dest);
undobuf.other_insn = cc_use_insn;
- }
+ }
}
/* Now we modify the current newpat: