summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2010-08-09 20:49:43 +0000
committerEli Friedman <eli.friedman@gmail.com>2010-08-09 20:49:43 +0000
commit4fffb345ed20bd144a31c1c1724cffb6f519b814 (patch)
treedc544fda11645c82e4dd413074c2fab1aea0ec8f /lib
parentca3469e59ed9ba66acf5ed94789198647d0b1868 (diff)
downloadllvm-4fffb345ed20bd144a31c1c1724cffb6f519b814.tar.gz
llvm-4fffb345ed20bd144a31c1c1724cffb6f519b814.tar.bz2
llvm-4fffb345ed20bd144a31c1c1724cffb6f519b814.tar.xz
PR7853: fix a silly mistake introduced in r101899, and add a test to make sure
it doesn't regress again. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110597 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/InstCombine/InstCombineCalls.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineCalls.cpp b/lib/Transforms/InstCombine/InstCombineCalls.cpp
index 52277a009d..0ebe3b4558 100644
--- a/lib/Transforms/InstCombine/InstCombineCalls.cpp
+++ b/lib/Transforms/InstCombine/InstCombineCalls.cpp
@@ -538,7 +538,7 @@ Instruction *InstCombiner::visitCallInst(CallInst &CI) {
// X + 0 -> {X, false}
if (RHS->isZero()) {
Constant *V[] = {
- UndefValue::get(II->getCalledValue()->getType()),
+ UndefValue::get(II->getArgOperand(0)->getType()),
ConstantInt::getFalse(II->getContext())
};
Constant *Struct = ConstantStruct::get(II->getContext(), V, 2, false);