Skip to content

Commit 0431871

Browse files
Acthinksdtcxzyw
andauthored
get the right Pred
Co-authored-by: Yingwei Zheng <dtcxzyw@qq.com>
1 parent e633e7e commit 0431871

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4495,7 +4495,7 @@ Instruction *InstCombinerImpl::foldSelectICmp(CmpPredicate Pred, SelectInst *SI,
44954495
"Invertible Operand0 mismatch");
44964496
auto *NewSI = Builder.CreateSelect(Cond, Values0->second,
44974497
Values1->second, SI->getName());
4498-
return ICmpInst::Create(Instruction::ICmp, I.getPredicate(), NewSI,
4498+
return ICmpInst::Create(Instruction::ICmp, Pred, NewSI,
44994499
Values0->first, I.getName());
45004500
}
45014501
}

0 commit comments

Comments
 (0)