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
This commit is contained in:
Eli Friedman
2010-08-09 20:49:43 +00:00
parent ca3469e59e
commit 4fffb345ed
2 changed files with 23 additions and 13 deletions

View File

@@ -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);