When initializing the PIC global base register on ARM/ELF add pc to fix the address.
authorBenjamin Kramer <benny.kra@googlemail.com>
Fri, 16 Aug 2013 12:52:08 +0000 (12:52 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Fri, 16 Aug 2013 12:52:08 +0000 (12:52 +0000)
commit309206667d881ddfeaa2961f330043352ea92b04
tree049469089237651942d3bb97710040d363127c22
parent19f66290e441e5c8782a7c2920296f3f8c2daed0
When initializing the PIC global base register on ARM/ELF add pc to fix the address.

This unbreaks PIC with fast isel on ELF targets (PR16717). The output matches
what GCC and SDag do for PIC but may not cover all of the many flavors of PIC
that exist.

llvm-svn: 188551
llvm/lib/Target/ARM/ARMInstrInfo.cpp
llvm/test/CodeGen/ARM/fast-isel-pic.ll