Commit 31dcf83f by Richard Stallman

(cse_insn): Reset the INSN_CODE for conditional

or computed jumps which have been converted into simplejumps.

From-SVN: r4287
parent d096c372
...@@ -3598,7 +3598,8 @@ simplify_binary_operation (code, mode, op0, op1) ...@@ -3598,7 +3598,8 @@ simplify_binary_operation (code, mode, op0, op1)
/* A | (~A) -> -1 */ /* A | (~A) -> -1 */
if (((GET_CODE (op0) == NOT && rtx_equal_p (XEXP (op0, 0), op1)) if (((GET_CODE (op0) == NOT && rtx_equal_p (XEXP (op0, 0), op1))
|| (GET_CODE (op1) == NOT && rtx_equal_p (XEXP (op1, 0), op0))) || (GET_CODE (op1) == NOT && rtx_equal_p (XEXP (op1, 0), op0)))
&& ! side_effects_p (op0)) && ! side_effects_p (op0)
&& mode == CCmode)
return constm1_rtx; return constm1_rtx;
break; break;
...@@ -3608,7 +3609,8 @@ simplify_binary_operation (code, mode, op0, op1) ...@@ -3608,7 +3609,8 @@ simplify_binary_operation (code, mode, op0, op1)
if (GET_CODE (op1) == CONST_INT if (GET_CODE (op1) == CONST_INT
&& (INTVAL (op1) & GET_MODE_MASK (mode)) == GET_MODE_MASK (mode)) && (INTVAL (op1) & GET_MODE_MASK (mode)) == GET_MODE_MASK (mode))
return gen_rtx (NOT, mode, op0); return gen_rtx (NOT, mode, op0);
if (op0 == op1 && ! side_effects_p (op0)) if (op0 == op1 && ! side_effects_p (op0)
&& mode == CCmode)
return const0_rtx; return const0_rtx;
break; break;
...@@ -3618,7 +3620,8 @@ simplify_binary_operation (code, mode, op0, op1) ...@@ -3618,7 +3620,8 @@ simplify_binary_operation (code, mode, op0, op1)
if (GET_CODE (op1) == CONST_INT if (GET_CODE (op1) == CONST_INT
&& (INTVAL (op1) & GET_MODE_MASK (mode)) == GET_MODE_MASK (mode)) && (INTVAL (op1) & GET_MODE_MASK (mode)) == GET_MODE_MASK (mode))
return op0; return op0;
if (op0 == op1 && ! side_effects_p (op0)) if (op0 == op1 && ! side_effects_p (op0)
&& mode == CCmode)
return op0; return op0;
/* A & (~A) -> 0 */ /* A & (~A) -> 0 */
if (((GET_CODE (op0) == NOT && rtx_equal_p (XEXP (op0, 0), op1)) if (((GET_CODE (op0) == NOT && rtx_equal_p (XEXP (op0, 0), op1))
...@@ -4159,6 +4162,11 @@ simplify_relational_operation (code, mode, op0, op1) ...@@ -4159,6 +4162,11 @@ simplify_relational_operation (code, mode, op0, op1)
if (GET_CODE (op0) == COMPARE && op1 == const0_rtx) if (GET_CODE (op0) == COMPARE && op1 == const0_rtx)
op1 = XEXP (op0, 1), op0 = XEXP (op0, 0); op1 = XEXP (op0, 1), op0 = XEXP (op0, 0);
/* What to do with CCmode isn't clear yet.
Let's make sure nothing erroneous is done. */
if (GET_MODE (op0) == CCmode)
return 0;
/* Unlike the arithmetic operations, we can do the comparison whether /* Unlike the arithmetic operations, we can do the comparison whether
or not WIDTH is larger than HOST_BITS_PER_WIDE_INT because the or not WIDTH is larger than HOST_BITS_PER_WIDE_INT because the
CONST_INTs are to be understood as being infinite precision as CONST_INTs are to be understood as being infinite precision as
...@@ -6595,6 +6603,13 @@ cse_insn (insn, in_libcall_block) ...@@ -6595,6 +6603,13 @@ cse_insn (insn, in_libcall_block)
delete_insn (insn); delete_insn (insn);
insn = new; insn = new;
} }
else
/* Otherwise, force rerecognition, since it probably had
a different pattern before.
This shouldn't really be necessary, since whatever
changed the source value above should have done this.
Until the right place is found, might as well do this here. */
INSN_CODE (insn) = -1;
/* Now that we've converted this jump to an unconditional jump, /* Now that we've converted this jump to an unconditional jump,
there is dead code after it. Delete the dead code until we there is dead code after it. Delete the dead code until we
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment