aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/InstCombine/InstructionCombining.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2010-11-22 13:42:49 +0000
committerDuncan Sands <baldrick@free.fr>2010-11-22 13:42:49 +0000
commit85bbff6c94695f07cc1a9765b4d384ed18d2fd7c (patch)
tree58bd5686e76c5bba4aeab38795eade78bf4e916d /lib/Transforms/InstCombine/InstructionCombining.cpp
parentad8aaa069cfdb3bdc32b1becc8881f67b5272e14 (diff)
Move the "gep undef" -> "undef" transform from instcombine to
InstructionSimplify. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119970 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine/InstructionCombining.cpp')
-rw-r--r--lib/Transforms/InstCombine/InstructionCombining.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/lib/Transforms/InstCombine/InstructionCombining.cpp b/lib/Transforms/InstCombine/InstructionCombining.cpp
index 61676f82b1..89d5bfbb6f 100644
--- a/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -523,9 +523,6 @@ Instruction *InstCombiner::visitGetElementPtrInst(GetElementPtrInst &GEP) {
Value *PtrOp = GEP.getOperand(0);
- if (isa<UndefValue>(GEP.getOperand(0)))
- return ReplaceInstUsesWith(GEP, UndefValue::get(GEP.getType()));
-
// Eliminate unneeded casts for indices.
if (TD) {
bool MadeChange = false;