Commit d960ab7b by Oleg Endo

re PR target/83831 ([RX] Unused bclr,bnot,bset insns)

gcc/
	PR target/83831
	* config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
	to QImode.

gcc/testsuite/
	PR target/83831
	* gcc.target/rx/pr83831.c (test_3, test_6): Adjust test cases.

From-SVN: r257735
parent be77ba2a
2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
PR target/83831
* config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
to QImode.
2018-02-16 Richard Biener <rguenther@suse.de>
PR tree-optimization/84037
......
......@@ -3515,7 +3515,7 @@ rx_fuse_in_memory_bitop (rtx* operands, rtx_insn* curr_insn,
if (volatile_insn_p (PATTERN (i)) || CALL_P (i))
return false;
emit_insn (gen_insn (mem, operands[1]));
emit_insn (gen_insn (mem, gen_lowpart (QImode, operands[1])));
set_insn_deleted (op2_def.insn);
set_insn_deleted (op0_use);
return true;
......
2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
PR target/83831
* gcc.target/rx/pr83831.c (test_3, test_6): Adjust test cases.
2018-02-16 Richard Biener <rguenther@suse.de>
PR tree-optimization/84417
......
/* { dg-do compile } */
/* { dg-options "-O1" } */
/* { dg-final { scan-assembler-times "bclr" 6 } } */
/* { dg-final { scan-assembler-times "bset" 6 } } */
/* { dg-final { scan-assembler-times "bnot" 6 } } */
/* { dg-final { scan-assembler-times "bset" 7 } } */
/* { dg-final { scan-assembler-times "bnot" 7 } } */
void
test_0 (char* x, unsigned int y)
......@@ -29,13 +29,14 @@ test_2 (unsigned int x)
}
void
test_3 (char* x, unsigned int y)
test_3 (char* x, unsigned int y, unsigned int z)
{
/* Expect 4x bset here. */
/* Expect 5x bset here. */
x[0] |= 0x10;
x[1] = y | (1 << 1);
x[2] |= 0x10;
x[65000] |= 0x10;
x[5] |= 1 << z;
}
unsigned int
......@@ -53,13 +54,14 @@ test_5 (unsigned int x)
}
void
test_6 (char* x, unsigned int y)
test_6 (char* x, unsigned int y, unsigned int z)
{
/* Expect 4x bnot here. */
/* Expect 5x bnot here. */
x[0] ^= 0x10;
x[1] = y ^ (1 << 1);
x[2] ^= 0x10;
x[65000] ^= 0x10;
x[5] ^= 1 << z;
}
unsigned int
......
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