@@ -3391,28 +3391,6 @@ Instruction *InstCombinerImpl::visitSelectInst(SelectInst &SI) {
3391
3391
ConstantInt::getFalse (CondType), SQ,
3392
3392
/* AllowRefinement */ true ))
3393
3393
return replaceOperand (SI, 2 , S);
3394
-
3395
- // Handle patterns involving sext/zext + not explicitly,
3396
- // as simplifyWithOpReplaced() only looks past one instruction.
3397
- Value *NotCond;
3398
-
3399
- // select a, sext(!a), b -> select !a, b, 0
3400
- // select a, zext(!a), b -> select !a, b, 0
3401
- if (match (TrueVal, m_ZExtOrSExt (m_CombineAnd (m_Value (NotCond),
3402
- m_Not (m_Specific (CondVal))))))
3403
- return SelectInst::Create (NotCond, FalseVal,
3404
- Constant::getNullValue (SelType));
3405
-
3406
- // select a, b, zext(!a) -> select !a, 1, b
3407
- if (match (FalseVal, m_ZExt (m_CombineAnd (m_Value (NotCond),
3408
- m_Not (m_Specific (CondVal))))))
3409
- return SelectInst::Create (NotCond, ConstantInt::get (SelType, 1 ), TrueVal);
3410
-
3411
- // select a, b, sext(!a) -> select !a, -1, b
3412
- if (match (FalseVal, m_SExt (m_CombineAnd (m_Value (NotCond),
3413
- m_Not (m_Specific (CondVal))))))
3414
- return SelectInst::Create (NotCond, Constant::getAllOnesValue (SelType),
3415
- TrueVal);
3416
3394
}
3417
3395
3418
3396
if (Instruction *R = foldSelectOfBools (SI))
0 commit comments