Commit 2c8cd08d authored by ktkachov's avatar ktkachov

[AArch64] Restore recog state after finding pre-madd instruction

	* config/aarch64/aarch64.c (aarch64_madd_needs_nop): Restore
	recog state after aarch64_prev_real_insn call.

	* gcc.target/aarch64/madd_after_asm_1.c: New test.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@216853 138bc75d-0d04-0410-961f-82ee72b054a4
parent d79ab8c7
2014-10-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64.c (aarch64_madd_needs_nop): Restore
recog state after aarch64_prev_real_insn call.
2014-10-27 Guozhi Wei <carrot@google.com>
PR tree-optimization/63530
......
......@@ -6557,6 +6557,10 @@ aarch64_madd_needs_nop (rtx insn)
return false;
prev = aarch64_prev_real_insn (insn);
/* aarch64_prev_real_insn can call recog_memoized on insns other than INSN.
Restore recog state to INSN to avoid state corruption. */
extract_constrain_insn_cached (insn);
if (!prev)
return false;
......
2014-10-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* gcc.target/aarch64/madd_after_asm_1.c: New test.
2014-10-27 Guozhi Wei <carrot@google.com>
PR tree-optimization/63530
......
/* { dg-do assemble } */
/* { dg-options "-O2 -mfix-cortex-a53-835769" } */
int
test (int a, double b, int c, int d, int e)
{
double result;
__asm__ __volatile ("// %0, %1"
: "=w" (result)
: "0" (b)
: /* No clobbers */
);
return c * d + e;
}
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