@@ -1134,10 +1134,10 @@ static void simplifyRecipe(VPRecipeBase &R, VPTypeAnalysis &TypeInfo) {
11341134 return Def->replaceAllUsesWith (
11351135 Builder.createLogicalAnd (X, Builder.createLogicalAnd (Y, Z)));
11361136
1137- if (match (Def, m_c_Mul (m_VPValue (A), m_SpecificInt ( 1 ))))
1137+ if (match (Def, m_c_Mul (m_VPValue (A), m_One ( ))))
11381138 return Def->replaceAllUsesWith (A);
11391139
1140- if (match (Def, m_c_Mul (m_VPValue (A), m_SpecificInt ( 0 ))))
1140+ if (match (Def, m_c_Mul (m_VPValue (A), m_ZeroInt ( ))))
11411141 return Def->replaceAllUsesWith (R.getOperand (0 ) == A ? R.getOperand (1 )
11421142 : R.getOperand (0 ));
11431143
@@ -1176,16 +1176,14 @@ static void simplifyRecipe(VPRecipeBase &R, VPTypeAnalysis &TypeInfo) {
11761176 }
11771177
11781178 // Remove redundant DerviedIVs, that is 0 + A * 1 -> A and 0 + 0 * x -> 0.
1179- if ((match (Def,
1180- m_DerivedIV (m_SpecificInt (0 ), m_VPValue (A), m_SpecificInt (1 ))) ||
1181- match (Def,
1182- m_DerivedIV (m_SpecificInt (0 ), m_SpecificInt (0 ), m_VPValue ()))) &&
1179+ if ((match (Def, m_DerivedIV (m_ZeroInt (), m_VPValue (A), m_One ())) ||
1180+ match (Def, m_DerivedIV (m_ZeroInt (), m_ZeroInt (), m_VPValue ()))) &&
11831181 TypeInfo.inferScalarType (Def->getOperand (1 )) ==
11841182 TypeInfo.inferScalarType (Def))
11851183 return Def->replaceAllUsesWith (Def->getOperand (1 ));
11861184
1187- if (match (Def, m_VPInstruction<VPInstruction::WideIVStep>(
1188- m_VPValue (X), m_SpecificInt ( 1 )))) {
1185+ if (match (Def, m_VPInstruction<VPInstruction::WideIVStep>(m_VPValue (X),
1186+ m_One ( )))) {
11891187 Type *WideStepTy = TypeInfo.inferScalarType (Def);
11901188 if (TypeInfo.inferScalarType (X) != WideStepTy)
11911189 X = Builder.createWidenCast (Instruction::Trunc, X, WideStepTy);
0 commit comments