@@ -1319,6 +1319,26 @@ m_AddLike(const LHS &L, const RHS &R) {
1319
1319
return m_CombineOr (m_Add (L, R), m_DisjointOr (L, R));
1320
1320
}
1321
1321
1322
+ // / Match either "add nsw" or "or disjoint"
1323
+ template <typename LHS, typename RHS>
1324
+ inline match_combine_or<
1325
+ OverflowingBinaryOp_match<LHS, RHS, Instruction::Add,
1326
+ OverflowingBinaryOperator::NoSignedWrap>,
1327
+ DisjointOr_match<LHS, RHS>>
1328
+ m_NSWAddLike (const LHS &L, const RHS &R) {
1329
+ return m_CombineOr (m_NSWAdd (L, R), m_DisjointOr (L, R));
1330
+ }
1331
+
1332
+ // / Match either "add nuw" or "or disjoint"
1333
+ template <typename LHS, typename RHS>
1334
+ inline match_combine_or<
1335
+ OverflowingBinaryOp_match<LHS, RHS, Instruction::Add,
1336
+ OverflowingBinaryOperator::NoUnsignedWrap>,
1337
+ DisjointOr_match<LHS, RHS>>
1338
+ m_NUWAddLike (const LHS &L, const RHS &R) {
1339
+ return m_CombineOr (m_NUWAdd (L, R), m_DisjointOr (L, R));
1340
+ }
1341
+
1322
1342
// ===----------------------------------------------------------------------===//
1323
1343
// Class that matches a group of binary opcodes.
1324
1344
//
0 commit comments