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 2f5c4f8 commit b42e0c5Copy full SHA for b42e0c5
llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
@@ -884,7 +884,7 @@ Instruction *InstCombinerImpl::foldAddWithConstant(BinaryOperator &Add) {
884
X->getType()->getScalarSizeInBits() == 1)
885
SI = SelectInst::Create(X, InstCombiner::AddOne(Op1C), Op1);
886
// sext(bool) + C -> bool ? C - 1 : C
887
- if (match(Op0, m_SExt(m_Value(X))) &&
+ if (!SI && match(Op0, m_SExt(m_Value(X))) &&
888
889
SI = SelectInst::Create(X, InstCombiner::SubOne(Op1C), Op1);
890
if (SI) {
0 commit comments