re PR target/62261 ([sh64] ICE for negative shift counts)
PR target/62261 * config/sh/sh.md (ashlsi3): Handle negative shift count for TARGET_SHMEDIA. (ashldi3, ashrsi3, ashrdi3, lshrsi3, lshrdi3): Likewise. From-SVN: r214612
This commit is contained in:
parent
109374e2fb
commit
1284f55903
|
@ -1,3 +1,10 @@
|
||||||
|
2014-08-27 Kaz Kojima <kkojima@gcc.gnu.org>
|
||||||
|
|
||||||
|
PR target/62261
|
||||||
|
* config/sh/sh.md (ashlsi3): Handle negative shift count for
|
||||||
|
TARGET_SHMEDIA.
|
||||||
|
(ashldi3, ashrsi3, ashrdi3, lshrsi3, lshrdi3): Likewise.
|
||||||
|
|
||||||
2014-08-27 Richard Sandiford <rdsandiford@googlemail.com>
|
2014-08-27 Richard Sandiford <rdsandiford@googlemail.com>
|
||||||
|
|
||||||
* emit-rtl.c (set_unique_reg_note): Discard notes with side effects.
|
* emit-rtl.c (set_unique_reg_note): Discard notes with side effects.
|
||||||
|
|
|
@ -4579,6 +4579,12 @@ label:
|
||||||
{
|
{
|
||||||
if (TARGET_SHMEDIA)
|
if (TARGET_SHMEDIA)
|
||||||
{
|
{
|
||||||
|
if (CONST_INT_P (operands[2]) && INTVAL (operands[2]) < 0)
|
||||||
|
{
|
||||||
|
operands[2] = GEN_INT (-INTVAL (operands[2]));
|
||||||
|
emit_insn (gen_ashrsi3_media (operands[0], operands[1], operands[2]));
|
||||||
|
DONE;
|
||||||
|
}
|
||||||
emit_insn (gen_ashlsi3_media (operands[0], operands[1], operands[2]));
|
emit_insn (gen_ashlsi3_media (operands[0], operands[1], operands[2]));
|
||||||
DONE;
|
DONE;
|
||||||
}
|
}
|
||||||
|
@ -4819,6 +4825,12 @@ label:
|
||||||
{
|
{
|
||||||
if (TARGET_SHMEDIA)
|
if (TARGET_SHMEDIA)
|
||||||
{
|
{
|
||||||
|
if (CONST_INT_P (operands[2]) && INTVAL (operands[2]) < 0)
|
||||||
|
{
|
||||||
|
operands[2] = GEN_INT (-INTVAL (operands[2]));
|
||||||
|
emit_insn (gen_ashrdi3_media (operands[0], operands[1], operands[2]));
|
||||||
|
DONE;
|
||||||
|
}
|
||||||
emit_insn (gen_ashldi3_media (operands[0], operands[1], operands[2]));
|
emit_insn (gen_ashldi3_media (operands[0], operands[1], operands[2]));
|
||||||
DONE;
|
DONE;
|
||||||
}
|
}
|
||||||
|
@ -4912,6 +4924,12 @@ label:
|
||||||
{
|
{
|
||||||
if (TARGET_SHMEDIA)
|
if (TARGET_SHMEDIA)
|
||||||
{
|
{
|
||||||
|
if (CONST_INT_P (operands[2]) && INTVAL (operands[2]) < 0)
|
||||||
|
{
|
||||||
|
operands[2] = GEN_INT (-INTVAL (operands[2]));
|
||||||
|
emit_insn (gen_ashlsi3_media (operands[0], operands[1], operands[2]));
|
||||||
|
DONE;
|
||||||
|
}
|
||||||
emit_insn (gen_ashrsi3_media (operands[0], operands[1], operands[2]));
|
emit_insn (gen_ashrsi3_media (operands[0], operands[1], operands[2]));
|
||||||
DONE;
|
DONE;
|
||||||
}
|
}
|
||||||
|
@ -5011,6 +5029,12 @@ label:
|
||||||
{
|
{
|
||||||
if (TARGET_SHMEDIA)
|
if (TARGET_SHMEDIA)
|
||||||
{
|
{
|
||||||
|
if (CONST_INT_P (operands[2]) && INTVAL (operands[2]) < 0)
|
||||||
|
{
|
||||||
|
operands[2] = GEN_INT (-INTVAL (operands[2]));
|
||||||
|
emit_insn (gen_ashldi3_media (operands[0], operands[1], operands[2]));
|
||||||
|
DONE;
|
||||||
|
}
|
||||||
emit_insn (gen_ashrdi3_media (operands[0], operands[1], operands[2]));
|
emit_insn (gen_ashrdi3_media (operands[0], operands[1], operands[2]));
|
||||||
DONE;
|
DONE;
|
||||||
}
|
}
|
||||||
|
@ -5085,6 +5109,12 @@ label:
|
||||||
{
|
{
|
||||||
if (TARGET_SHMEDIA)
|
if (TARGET_SHMEDIA)
|
||||||
{
|
{
|
||||||
|
if (CONST_INT_P (operands[2]) && INTVAL (operands[2]) < 0)
|
||||||
|
{
|
||||||
|
operands[2] = GEN_INT (-INTVAL (operands[2]));
|
||||||
|
emit_insn (gen_ashlsi3_media (operands[0], operands[1], operands[2]));
|
||||||
|
DONE;
|
||||||
|
}
|
||||||
emit_insn (gen_lshrsi3_media (operands[0], operands[1], operands[2]));
|
emit_insn (gen_lshrsi3_media (operands[0], operands[1], operands[2]));
|
||||||
DONE;
|
DONE;
|
||||||
}
|
}
|
||||||
|
@ -5279,6 +5309,12 @@ label:
|
||||||
{
|
{
|
||||||
if (TARGET_SHMEDIA)
|
if (TARGET_SHMEDIA)
|
||||||
{
|
{
|
||||||
|
if (CONST_INT_P (operands[2]) && INTVAL (operands[2]) < 0)
|
||||||
|
{
|
||||||
|
operands[2] = GEN_INT (-INTVAL (operands[2]));
|
||||||
|
emit_insn (gen_ashldi3_media (operands[0], operands[1], operands[2]));
|
||||||
|
DONE;
|
||||||
|
}
|
||||||
emit_insn (gen_lshrdi3_media (operands[0], operands[1], operands[2]));
|
emit_insn (gen_lshrdi3_media (operands[0], operands[1], operands[2]));
|
||||||
DONE;
|
DONE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue