Commit 91f66e78 by Segher Boessenkool Committed by Segher Boessenkool

sh: Fixes for RTL checking


	* config/sh/sh.md (tstsi_t): If operands[0] is a SUBREG instead of
	a REG, look at the REG it is a SUBREG of.
	(splitter for cmpeqsi_t): Ditto.

From-SVN: r245727
parent 8faa8118
2017-02-24 Segher Boessenkool <segher@kernel.crashing.org> 2017-02-24 Segher Boessenkool <segher@kernel.crashing.org>
* config/sh/sh.md (tstsi_t): If operands[0] is a SUBREG instead of
a REG, look at the REG it is a SUBREG of.
(splitter for cmpeqsi_t): Ditto.
2017-02-24 Segher Boessenkool <segher@kernel.crashing.org>
* config/pa/pa.c (pa_combine_instructions): Do not share RTL. Make * config/pa/pa.c (pa_combine_instructions): Do not share RTL. Make
the special USEs with the pattern of the insn, not the insn itself. the special USEs with the pattern of the insn, not the insn itself.
......
...@@ -561,8 +561,12 @@ ...@@ -561,8 +561,12 @@
gcc_assert (CONST_INT_P (operands[1])); gcc_assert (CONST_INT_P (operands[1]));
HOST_WIDE_INT op1val = INTVAL (operands[1]); HOST_WIDE_INT op1val = INTVAL (operands[1]);
rtx reg = operands[0];
if (SUBREG_P (reg))
reg = SUBREG_REG (reg);
gcc_assert (REG_P (reg));
bool op0_dead_after_this = bool op0_dead_after_this =
sh_reg_dead_or_unused_after_insn (curr_insn, REGNO (operands[0])); sh_reg_dead_or_unused_after_insn (curr_insn, REGNO (reg));
if (optimize) if (optimize)
{ {
...@@ -834,7 +838,11 @@ ...@@ -834,7 +838,11 @@
/* If the tested reg is not dead after this insn, it's probably used by /* If the tested reg is not dead after this insn, it's probably used by
something else after the comparison. It's probably better to leave something else after the comparison. It's probably better to leave
it as it is. */ it as it is. */
if (find_regno_note (curr_insn, REG_DEAD, REGNO (operands[0])) == NULL_RTX) rtx reg = operands[0];
if (SUBREG_P (reg))
reg = SUBREG_REG (reg);
gcc_assert (REG_P (reg));
if (find_regno_note (curr_insn, REG_DEAD, REGNO (reg)) != NULL_RTX)
FAIL; FAIL;
/* FIXME: Maybe also search the predecessor basic blocks to catch /* FIXME: Maybe also search the predecessor basic blocks to catch
......
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