From ae1b4595ea4c869d9d963f9e0cb4f23cb79c6105 Mon Sep 17 00:00:00 2001 From: uweigand Date: Fri, 17 Oct 2003 13:36:48 +0000 Subject: [PATCH] * combine.c (simplify_set): Do not clear out undobuf.other_insn already set elsewhere. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72602 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/combine.c | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b82a371..8f5c802 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-10-17 Ulrich Weigand + + * combine.c (simplify_set): Do not clear out undobuf.other_insn + already set elsewhere. + 2003-10-17 Kelley Cook * config/i386/i386.c (ix86_expand_prologue): Use diff --git a/gcc/combine.c b/gcc/combine.c index cac585a..c36d922 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -5084,10 +5084,12 @@ simplify_set (rtx x) undobuf.other_insn. */ if (new_code != old_code) { + int other_changed_previously = other_changed; unsigned HOST_WIDE_INT mask; SUBST (*cc_use, gen_rtx_fmt_ee (new_code, GET_MODE (*cc_use), dest, const0_rtx)); + other_changed = 1; /* If the only change we made was to change an EQ into an NE or vice versa, OP0 has only one bit that might be nonzero, and OP1 @@ -5097,7 +5099,7 @@ simplify_set (rtx x) if (((old_code == NE && new_code == EQ) || (old_code == EQ && new_code == NE)) - && ! other_changed && op1 == const0_rtx + && ! other_changed_previously && op1 == const0_rtx && GET_MODE_BITSIZE (GET_MODE (op0)) <= HOST_BITS_PER_WIDE_INT && exact_log2 (mask = nonzero_bits (op0, GET_MODE (op0))) >= 0) { @@ -5107,13 +5109,11 @@ simplify_set (rtx x) && ! check_asm_operands (pat))) { PUT_CODE (*cc_use, old_code); - other_insn = 0; + other_changed = 0; op0 = gen_binary (XOR, GET_MODE (op0), op0, GEN_INT (mask)); } } - - other_changed = 1; } if (other_changed) -- 2.7.4