Commit 390875e6 by Kugan Vivekanandarajah Committed by Kugan Vivekanandarajah

reg_equal_test.c: New test.

gcc/testsuite/ChangeLog:

2015-07-23  Kugan Vivekanandarajah  <kuganv@linaro.org>

	* gcc.target/arm/reg_equal_test.c: New test.

gcc/ChangeLog:

2015-07-23  Kugan Vivekanandarajah  <kuganv@linaro.org>

	* config/arm/arm.c (arm_emit_movpair): Add REG_EQUAL notes to
	instruction.

From-SVN: r226135
parent fa24123b
2015-07-23 Kugan Vivekanandarajah <kuganv@linaro.org>
* config/arm/arm.c (arm_emit_movpair): Add REG_EQUAL notes to
instruction.
2015-07-23 Kugan Vivekanandarajah <kuganv@linaro.org>
* cse.c (cse_insn): Fix missing check for STRICT_LOW_PART and minor
clean up.
......
......@@ -17871,19 +17871,27 @@ output_mov_long_double_arm_from_arm (rtx *operands)
void
arm_emit_movpair (rtx dest, rtx src)
{
rtx insn;
/* If the src is an immediate, simplify it. */
if (CONST_INT_P (src))
{
HOST_WIDE_INT val = INTVAL (src);
emit_set_insn (dest, GEN_INT (val & 0x0000ffff));
if ((val >> 16) & 0x0000ffff)
emit_set_insn (gen_rtx_ZERO_EXTRACT (SImode, dest, GEN_INT (16),
GEN_INT (16)),
GEN_INT ((val >> 16) & 0x0000ffff));
{
emit_set_insn (gen_rtx_ZERO_EXTRACT (SImode, dest, GEN_INT (16),
GEN_INT (16)),
GEN_INT ((val >> 16) & 0x0000ffff));
insn = get_last_insn ();
set_unique_reg_note (insn, REG_EQUAL, copy_rtx (src));
}
return;
}
emit_set_insn (dest, gen_rtx_HIGH (SImode, src));
emit_set_insn (dest, gen_rtx_LO_SUM (SImode, dest, src));
insn = get_last_insn ();
set_unique_reg_note (insn, REG_EQUAL, copy_rtx (src));
}
/* Output a move between double words. It must be REG<-MEM
......
2015-07-23 Kugan Vivekanandarajah <kuganv@linaro.org>
* gcc.target/arm/reg_equal_test.c: New test.
2015-07-23 Jeff Law <law@redhat.com>
PR lto/66752
......
/* { dg-do compile } */
/* { dg-options "-O1 -fdump-rtl-expand" } */
extern void abort (void);
unsigned int a = 1;
int
main (void)
{
unsigned int b, c, d;
if (sizeof (int) != 4 || (int) 0xc7d24b5e > 0)
return 0;
c = 0xc7d24b5e;
d = a | -2;
b = (d == 0) ? c : (c % d);
if (b != c)
abort ();
return 0;
}
/* { dg-final { scan-rtl-dump "expr_list:REG_EQUAL \\(const_int -942519458" "expand" } } */
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