In the initial exec mode we always do a load to find the address of a variable.
authorRafael Espindola <rafael.espindola@gmail.com>
Fri, 29 Jun 2012 04:22:35 +0000 (04:22 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Fri, 29 Jun 2012 04:22:35 +0000 (04:22 +0000)
commit94e3b388e561ce980c861e092bf378bf40202268
tree8726b68f289bde877a0ffbcc2051c72a96909ab1
parent5559ffae2beb0adc868a0839a3bb560a063cc3e1
In the initial exec mode we always do a load to find the address of a variable.
Before this patch in pic 32 bit code we would add the global base register
and not load from that address. This is a really old bug, but before the
introduction of the tls attributes we would never select initial exec for
pic code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159409 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/tls-pie.ll