@@ -1134,10 +1134,10 @@ static void simplifyRecipe(VPRecipeBase &R, VPTypeAnalysis &TypeInfo) {
1134
1134
return Def->replaceAllUsesWith (
1135
1135
Builder.createLogicalAnd (X, Builder.createLogicalAnd (Y, Z)));
1136
1136
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 ( ))))
1138
1138
return Def->replaceAllUsesWith (A);
1139
1139
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 ( ))))
1141
1141
return Def->replaceAllUsesWith (R.getOperand (0 ) == A ? R.getOperand (1 )
1142
1142
: R.getOperand (0 ));
1143
1143
@@ -1176,16 +1176,14 @@ static void simplifyRecipe(VPRecipeBase &R, VPTypeAnalysis &TypeInfo) {
1176
1176
}
1177
1177
1178
1178
// 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 ()))) &&
1183
1181
TypeInfo.inferScalarType (Def->getOperand (1 )) ==
1184
1182
TypeInfo.inferScalarType (Def))
1185
1183
return Def->replaceAllUsesWith (Def->getOperand (1 ));
1186
1184
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 ( )))) {
1189
1187
Type *WideStepTy = TypeInfo.inferScalarType (Def);
1190
1188
if (TypeInfo.inferScalarType (X) != WideStepTy)
1191
1189
X = Builder.createWidenCast (Instruction::Trunc, X, WideStepTy);
0 commit comments