summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/GVNPRE.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Scalar/GVNPRE.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/GVNPRE.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVNPRE.cpp b/llvm/lib/Transforms/Scalar/GVNPRE.cpp
index be86f3a797f..33926ea127a 100644
--- a/llvm/lib/Transforms/Scalar/GVNPRE.cpp
+++ b/llvm/lib/Transforms/Scalar/GVNPRE.cpp
@@ -836,7 +836,7 @@ Value* GVNPRE::phi_translate(Value* V, BasicBlock* pred, BasicBlock* succ) {
}
if (newOp1 != U->getPointerOperand() || changed_idx) {
- Instruction* newVal = new GetElementPtrInst(U->getPointerOperand(),
+ Instruction* newVal = new GetElementPtrInst(newOp1,
&newIdx[0], newIdx.size(),
U->getName()+".expr");
OpenPOWER on IntegriCloud