[X86TTI] Make constant base pointers for getElementPtr opaque.
authorJuergen Ributzka <juergen@apple.com>
Tue, 25 Mar 2014 18:01:25 +0000 (18:01 +0000)
committerJuergen Ributzka <juergen@apple.com>
Tue, 25 Mar 2014 18:01:25 +0000 (18:01 +0000)
commitfeaa46379a99a12c1ebc07ebc2ced7e2e906031b
tree2f691c38e2f650d5a3d2eded08749bec2c4ae922
parente987eb12b66a5e3b265802d924d43d57020eabce
[X86TTI] Make constant base pointers for getElementPtr opaque.

If getElementPtr uses a constant as base pointer, then make the constant opaque.
This prevents constant folding it with the offset. The offset can usually be
encoded in the load/store instruction itself and the base address doesn't have
to be rematerialized several times.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204739 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86TargetTransformInfo.cpp