Commit ac7ef8d5 by Franz Sirl Committed by Jeff Law

cse.c (fold_rtx): Update comments for (const (minus (label) (label))) case.

        * cse.c (fold_rtx): Update comments for (const (minus (label) (label)))
        case.
        (cse_insn): Avoid creating a bogus REG_EQUAL note for
        (const (minus (label) (label)))
        (record_jump_cond): Fix mismatched paren in comment.
Fixes powerpc label-label problem.
Bootstraps on the x86.

Co-Authored-By: Jeffrey A Law <law@cygnus.com>

From-SVN: r25527
parent 560a78fc
Tue Mar 2 01:40:01 1999 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
Jeffrey A Law (law@cygnus.com)
* cse.c (fold_rtx): Update comments for (const (minus (label) (label)))
case.
(cse_insn): Avoid creating a bogus REG_EQUAL note for
(const (minus (label) (label)))
(record_jump_cond): Fix mismatched paren in comment.
Tue Mar 2 01:07:12 1999 Dan Nicolaescu <dann@godzilla.ics.uci.edu> Tue Mar 2 01:07:12 1999 Dan Nicolaescu <dann@godzilla.ics.uci.edu>
* final.c (end_final): There are 11 words in the "main header" * final.c (end_final): There are 11 words in the "main header"
......
...@@ -5292,7 +5292,11 @@ fold_rtx (x, insn) ...@@ -5292,7 +5292,11 @@ fold_rtx (x, insn)
/* Indicate this is a constant. This isn't a /* Indicate this is a constant. This isn't a
valid form of CONST, but it will only be used valid form of CONST, but it will only be used
to fold the next insns and then discarded, so to fold the next insns and then discarded, so
it should be safe. */ it should be safe.
Note this expression must be explicitly discarded,
by cse_insn, else it may end up in a REG_EQUAL note
and "escape" to cause problems elsewhere. */
return gen_rtx_CONST (GET_MODE (new), new); return gen_rtx_CONST (GET_MODE (new), new);
} }
} }
...@@ -6037,7 +6041,7 @@ record_jump_cond (code, mode, op0, op1, reversed_nonequality) ...@@ -6037,7 +6041,7 @@ record_jump_cond (code, mode, op0, op1, reversed_nonequality)
/* If OP0 and OP1 are known equal, and either is a paradoxical SUBREG, /* If OP0 and OP1 are known equal, and either is a paradoxical SUBREG,
we know that they are also equal in the smaller mode (this is also we know that they are also equal in the smaller mode (this is also
true for all smaller modes whether or not there is a SUBREG, but true for all smaller modes whether or not there is a SUBREG, but
is not worth testing for with no SUBREG. */ is not worth testing for with no SUBREG). */
/* Note that GET_MODE (op0) may not equal MODE. */ /* Note that GET_MODE (op0) may not equal MODE. */
if (code == EQ && GET_CODE (op0) == SUBREG if (code == EQ && GET_CODE (op0) == SUBREG
...@@ -7170,9 +7174,18 @@ cse_insn (insn, libcall_insn) ...@@ -7170,9 +7174,18 @@ cse_insn (insn, libcall_insn)
equivalent constant, we want to add a REG_NOTE. We don't want equivalent constant, we want to add a REG_NOTE. We don't want
to write a REG_EQUAL note for a constant pseudo since verifying that to write a REG_EQUAL note for a constant pseudo since verifying that
that pseudo hasn't been eliminated is a pain. Such a note also that pseudo hasn't been eliminated is a pain. Such a note also
won't help anything. */ won't help anything.
Avoid a REG_EQUAL note for (CONST (MINUS (LABEL_REF) (LABEL_REF)))
which can be created for a reference to a compile time computable
entry in a jump table. */
if (n_sets == 1 && src_const && GET_CODE (dest) == REG if (n_sets == 1 && src_const && GET_CODE (dest) == REG
&& GET_CODE (src_const) != REG) && GET_CODE (src_const) != REG
&& ! (GET_CODE (src_const) == CONST
&& GET_CODE (XEXP (src_const, 0)) == MINUS
&& GET_CODE (XEXP (XEXP (src_const, 0), 0)) == LABEL_REF
&& GET_CODE (XEXP (XEXP (src_const, 0), 1)) == LABEL_REF))
{ {
tem = find_reg_note (insn, REG_EQUAL, NULL_RTX); tem = find_reg_note (insn, REG_EQUAL, NULL_RTX);
......
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