[ARC] Fix legitimize pic address.
authorClaudiu Zissulescu <claziss@gmail.com>
Mon, 11 Nov 2019 15:40:09 +0000 (15:40 +0000)
committerClaudiu Zissulescu <claziss@gcc.gnu.org>
Mon, 11 Nov 2019 15:40:09 +0000 (16:40 +0100)
commit3a6dd06b6ce8be29cdcfd0b3a0c5e6c66767095e
treed2c6f9613e5f0c63d11504626c807694ee3fa4ac
parente22c2220273615294dc7fb11867267ca92694358
[ARC] Fix legitimize pic address.

There are cases when an pic address gets complicated, and it needs to
be resolved via force_reg function found in
prepare_move_operands. When this happens, we need to disambiguate the
pic address and re-legitimize it.

gcc/
xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>

* config/arc/arc.c (arc_legitimize_pic_address): Consider UNSPECs
as well, if interesting recover the symbol and re-legitimize the
pic address.

gcc/testsuite/
xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>

* gcc.target/arc/pic-2.c: New file.

From-SVN: r278056
gcc/ChangeLog
gcc/config/arc/arc.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arc/pic-2.c [new file with mode: 0644]