@@ -4579,6 +4579,12 @@ label:
{
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]));
DONE;
}
@@ -4819,6 +4825,12 @@ label:
{
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]));
DONE;
}
@@ -4912,6 +4924,12 @@ label:
{
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]));
DONE;
}
@@ -5011,6 +5029,12 @@ label:
{
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]));
DONE;
}
@@ -5085,6 +5109,12 @@ label:
{
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]));
DONE;
}
@@ -5279,6 +5309,12 @@ label:
{
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]));
DONE;
}