replace usage of EmitGEPOffset() with TargetData::getIndexedOffset() when the GEP...
authorNuno Lopes <nunoplopes@sapo.pt>
Wed, 20 Jun 2012 17:30:51 +0000 (17:30 +0000)
committerNuno Lopes <nunoplopes@sapo.pt>
Wed, 20 Jun 2012 17:30:51 +0000 (17:30 +0000)
commitb47f3ea22461b2d877d4a3246d54bdeab4fcfaa3
treed78db680f4aadcb32f27a0a143778326ce8a6d0c
parent2769e9338429377f0d06fb78ec884bf69b0c7d41
replace usage of EmitGEPOffset() with TargetData::getIndexedOffset() when the GEP offset is known to be constant.
With this change, we avoid relying on the IR Builder to constant fold the operations.

No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158829 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineCasts.cpp
lib/Transforms/InstCombine/InstructionCombining.cpp