diff options
author | Qing Zhao <qing.zhao@oracle.com> | 2017-10-11 19:43:54 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2017-10-11 19:43:54 +0000 |
commit | 241dbd9d6844dc7f9c463674bd1221984eec539e (patch) | |
tree | 5bd904d82dedac2e34f87205a2b84e79e1b0b410 /gcc/config | |
parent | 6dcb9e910b8e6f7638f88d657bb9cc10d38b141c (diff) | |
download | gcc-241dbd9d6844dc7f9c463674bd1221984eec539e.zip gcc-241dbd9d6844dc7f9c463674bd1221984eec539e.tar.gz gcc-241dbd9d6844dc7f9c463674bd1221984eec539e.tar.bz2 |
re PR target/81422 ([aarch64] internal compiler error: in update_equiv_regs, at ira.c:3425)
/gcc
2017-10-11 Qing Zhao <qing.zhao@oracle.com>
PR target/81422
* config/aarch64/aarch64.c (aarch64_load_symref_appropriately):
Check whether the dest is REG before adding REG_EQUIV note.
/gcc/testsuite
2017-10-11 Qing Zhao <qing.zhao@oracle.com>
PR target/81422
* gcc.target/aarch64/pr81422.C: New test.
From-SVN: r253657
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/aarch64/aarch64.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 6b3a756..ec05587 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -1490,7 +1490,8 @@ aarch64_load_symref_appropriately (rtx dest, rtx imm, tp = gen_lowpart (mode, tp); emit_insn (gen_rtx_SET (dest, gen_rtx_PLUS (mode, tp, x0))); - set_unique_reg_note (get_last_insn (), REG_EQUIV, imm); + if (REG_P (dest)) + set_unique_reg_note (get_last_insn (), REG_EQUIV, imm); return; } @@ -1524,7 +1525,8 @@ aarch64_load_symref_appropriately (rtx dest, rtx imm, } emit_insn (gen_rtx_SET (dest, gen_rtx_PLUS (mode, tp, tmp_reg))); - set_unique_reg_note (get_last_insn (), REG_EQUIV, imm); + if (REG_P (dest)) + set_unique_reg_note (get_last_insn (), REG_EQUIV, imm); return; } @@ -1565,7 +1567,8 @@ aarch64_load_symref_appropriately (rtx dest, rtx imm, gcc_unreachable (); } - set_unique_reg_note (get_last_insn (), REG_EQUIV, imm); + if (REG_P (dest)) + set_unique_reg_note (get_last_insn (), REG_EQUIV, imm); return; } @@ -1594,7 +1597,8 @@ aarch64_load_symref_appropriately (rtx dest, rtx imm, emit_insn (gen_tlsie_tiny_sidi (dest, imm, tp)); } - set_unique_reg_note (get_last_insn (), REG_EQUIV, imm); + if (REG_P (dest)) + set_unique_reg_note (get_last_insn (), REG_EQUIV, imm); return; } |