diff options
author | ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-29 21:44:05 +0000 |
---|---|---|
committer | ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-29 21:44:05 +0000 |
commit | fcf02f908044a8e58ec88b48875cba165a806f38 (patch) | |
tree | e420a20917a7cfba03b9d4d171afd166c12e32e3 /gcc/config/aarch64 | |
parent | 1ceb3fa7741ad071994a33267270f8d705766d84 (diff) | |
download | gcc-fcf02f908044a8e58ec88b48875cba165a806f38.tar.gz |
[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/trunk@216852 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/aarch64')
-rw-r--r-- | gcc/config/aarch64/aarch64.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index e222ee37cf2..0400fd503d2 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -7770,6 +7770,10 @@ aarch64_madd_needs_nop (rtx_insn* 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 || !has_memory_op (prev)) return false; |