We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e854101 commit da1b1d0Copy full SHA for da1b1d0
llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
@@ -1303,7 +1303,8 @@ Instruction *InstCombinerImpl::foldICmpWithZero(ICmpInst &Cmp) {
1303
// where f(X) == 0 if and only if X == 0
1304
if (ICmpInst::isEquality(Pred))
1305
if (Value *Stripped = stripNullTest(Cmp.getOperand(0)))
1306
- return new ICmpInst(Pred, Stripped, Cmp.getOperand(1));
+ return new ICmpInst(Pred, Stripped,
1307
+ Constant::getNullValue(Stripped->getType()));
1308
1309
return nullptr;
1310
}
0 commit comments