summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-05-05 18:03:48 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-05-05 18:03:48 +0000
commit73cf872adb7983c464ad24dc28827defdf6b11d4 (patch)
tree4f79f94c1043e4b9520d5c33bcee03d1aa76394a /llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
parent26438d26fa4966e49ada9c74d014f3ae2c14a7d2 (diff)
downloadbcm5719-llvm-73cf872adb7983c464ad24dc28827defdf6b11d4.tar.gz
bcm5719-llvm-73cf872adb7983c464ad24dc28827defdf6b11d4.zip
[opaque pointer type] Track explicit GEP pointee type through in-memory IR
llvm-svn: 236510
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstructionCombining.cpp')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstructionCombining.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
index f62941fbf64..53ab81dbef2 100644
--- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -1602,6 +1602,7 @@ Instruction *InstCombiner::visitGetElementPtrInst(GetElementPtrInst &GEP) {
// is a leading zero) we can fold the cast into this GEP.
if (StrippedPtrTy->getAddressSpace() == GEP.getAddressSpace()) {
GEP.setOperand(0, StrippedPtr);
+ GEP.setSourceElementType(XATy);
return &GEP;
}
// Cannot replace the base pointer directly because StrippedPtr's
OpenPOWER on IntegriCloud