Lines Matching refs:CR1
46 EnumerateConstantRanges(Bits, [&](const ConstantRange &CR1) { in EnumerateTwoConstantRanges() argument
48 TestFn(CR1, CR2); in EnumerateTwoConstantRanges()
135 Bits, [&](const ConstantRange &CR1, const ConstantRange &CR2) { in TestUnsignedBinOpExhaustive() argument
136 UnsignedOpRangeGatherer R(CR1.getBitWidth()); in TestUnsignedBinOpExhaustive()
137 ForeachNumInConstantRange(CR1, [&](const APInt &N1) { in TestUnsignedBinOpExhaustive()
145 ConstantRange CR = RangeFn(CR1, CR2); in TestUnsignedBinOpExhaustive()
167 Bits, [&](const ConstantRange &CR1, const ConstantRange &CR2) { in TestSignedBinOpExhaustive() argument
168 SignedOpRangeGatherer R(CR1.getBitWidth()); in TestSignedBinOpExhaustive()
169 ForeachNumInConstantRange(CR1, [&](const APInt &N1) { in TestSignedBinOpExhaustive()
178 ConstantRange CR = RangeFn(CR1, CR2); in TestSignedBinOpExhaustive()
342 ConstantRange CR1(APInt(8, 42), APInt::getMinValue(8)); in TEST_F() local
343 EXPECT_FALSE(CR1.isWrappedSet()); in TEST_F()
344 EXPECT_TRUE(CR1.isUpperWrapped()); in TEST_F()
485 [=](const ConstantRange &CR1, const ConstantRange &CR2) { in testBinarySetOperationExhaustive() argument
498 if (!InResultFn(CR1, CR2, Num)) { in testBinarySetOperationExhaustive()
529 ConstantRange SmallestCR = OpFn(CR1, CR2, ConstantRange::Smallest); in testBinarySetOperationExhaustive()
530 ConstantRange UnsignedCR = OpFn(CR1, CR2, ConstantRange::Unsigned); in testBinarySetOperationExhaustive()
531 ConstantRange SignedCR = OpFn(CR1, CR2, ConstantRange::Signed); in testBinarySetOperationExhaustive()
611 [](const ConstantRange &CR1, const ConstantRange &CR2, in TEST_F()
613 return CR1.intersectWith(CR2, Type); in TEST_F()
615 [](const ConstantRange &CR1, const ConstantRange &CR2, const APInt &N) { in TEST_F() argument
616 return CR1.contains(N) && CR2.contains(N); in TEST_F()
622 [](const ConstantRange &CR1, const ConstantRange &CR2, in TEST_F()
624 return CR1.unionWith(CR2, Type); in TEST_F()
626 [](const ConstantRange &CR1, const ConstantRange &CR2, const APInt &N) { in TEST_F() argument
627 return CR1.contains(N) || CR2.contains(N); in TEST_F()
755 EnumerateTwoConstantRanges(Bits, [&](const ConstantRange &CR1, in TestAddWithNoSignedWrapExhaustive()
757 ConstantRange CR = RangeFn(CR1, CR2); in TestAddWithNoSignedWrapExhaustive()
760 ForeachNumInConstantRange(CR1, [&](const APInt &N1) { in TestAddWithNoSignedWrapExhaustive()
774 if (CR1.isSignWrappedSet() || CR2.isSignWrappedSet()) in TestAddWithNoSignedWrapExhaustive()
785 EnumerateTwoConstantRanges(Bits, [&](const ConstantRange &CR1, in TestAddWithNoUnsignedWrapExhaustive()
787 ConstantRange CR = RangeFn(CR1, CR2); in TestAddWithNoUnsignedWrapExhaustive()
790 ForeachNumInConstantRange(CR1, [&](const APInt &N1) { in TestAddWithNoUnsignedWrapExhaustive()
804 if (CR1.isWrappedSet() || CR2.isWrappedSet()) in TestAddWithNoUnsignedWrapExhaustive()
818 Bits, [&](const ConstantRange &CR1, const ConstantRange &CR2) { in TestAddWithNoSignedUnsignedWrapExhaustive() argument
819 ConstantRange CR = RangeFn(CR1, CR2); in TestAddWithNoSignedUnsignedWrapExhaustive()
823 ForeachNumInConstantRange(CR1, [&](const APInt &N1) { in TestAddWithNoSignedUnsignedWrapExhaustive()
839 if (CR1.isWrappedSet() || CR2.isWrappedSet() || in TestAddWithNoSignedUnsignedWrapExhaustive()
840 CR1.isSignWrappedSet() || CR2.isSignWrappedSet()) in TestAddWithNoSignedUnsignedWrapExhaustive()
906 [](const ConstantRange &CR1, const ConstantRange &CR2) { in TEST_F() argument
907 return CR1.addWithNoWrap(CR2, OBO::NoSignedWrap); in TEST_F()
954 [](const ConstantRange &CR1, const ConstantRange &CR2) { in TEST_F() argument
955 return CR1.addWithNoWrap(CR2, OBO::NoUnsignedWrap); in TEST_F()
988 [](const ConstantRange &CR1, const ConstantRange &CR2) { in TEST_F() argument
989 return CR1.addWithNoWrap(CR2, OBO::NoUnsignedWrap | OBO::NoSignedWrap); in TEST_F()
1024 [](const ConstantRange &CR1, const ConstantRange &CR2) { in TEST_F() argument
1025 return CR1.subWithNoWrap(CR2, OBO::NoSignedWrap); in TEST_F()
1031 [](const ConstantRange &CR1, const ConstantRange &CR2) { in TEST_F() argument
1032 return CR1.subWithNoWrap(CR2, OBO::NoUnsignedWrap); in TEST_F()
1038 [](const ConstantRange &CR1, const ConstantRange &CR2) { in TEST_F() argument
1039 return CR1.subWithNoWrap(CR2, OBO::NoUnsignedWrap | OBO::NoSignedWrap); in TEST_F()
1205 EnumerateTwoConstantRanges(Bits, [&](const ConstantRange &CR1, in TEST_F()
1211 ForeachNumInConstantRange(CR1, [&](const APInt &N1) { in TEST_F()
1226 ConstantRange CR = CR1.sdiv(CR2); in TEST_F()
1287 [](const ConstantRange &CR1, const ConstantRange &CR2) { in TEST_F() argument
1288 return CR1.urem(CR2); in TEST_F()
1360 [](const ConstantRange &CR1, const ConstantRange &CR2) { in TEST_F() argument
1361 return CR1.srem(CR2); in TEST_F()
2075 EnumerateTwoConstantRanges(Bits, [=](const ConstantRange &CR1, in TestOverflowExhaustive()
2082 ForeachNumInConstantRange(CR1, [&](const APInt &N1) { in TestOverflowExhaustive()
2097 ConstantRange::OverflowResult OR = MayOverflowFn(CR1, CR2); in TestOverflowExhaustive()
2118 if (CR1.isEmptySet() || CR2.isEmptySet()) in TestOverflowExhaustive()
2136 [](const ConstantRange &CR1, const ConstantRange &CR2) { in TEST_F() argument
2137 return CR1.unsignedAddMayOverflow(CR2); in TEST_F()
2149 [](const ConstantRange &CR1, const ConstantRange &CR2) { in TEST_F() argument
2150 return CR1.unsignedSubMayOverflow(CR2); in TEST_F()
2162 [](const ConstantRange &CR1, const ConstantRange &CR2) { in TEST_F() argument
2163 return CR1.unsignedMulMayOverflow(CR2); in TEST_F()
2175 [](const ConstantRange &CR1, const ConstantRange &CR2) { in TEST_F() argument
2176 return CR1.signedAddMayOverflow(CR2); in TEST_F()
2188 [](const ConstantRange &CR1, const ConstantRange &CR2) { in TEST_F() argument
2189 return CR1.signedSubMayOverflow(CR2); in TEST_F()
2211 ConstantRange CR1(APInt(8, 164), APInt(8, 237 + 1)); in TEST_F() local
2212 EXPECT_EQ(CR1, ConstantRange::fromKnownBits(Known, /*signed*/false)); in TEST_F()
2213 EXPECT_EQ(CR1, ConstantRange::fromKnownBits(Known, /*signed*/true)); in TEST_F()
2282 [](const ConstantRange &CR1, const ConstantRange &CR2) { in TEST_F() argument
2283 return CR1.uadd_sat(CR2); in TEST_F()
2292 [](const ConstantRange &CR1, const ConstantRange &CR2) { in TEST_F() argument
2293 return CR1.usub_sat(CR2); in TEST_F()
2302 [](const ConstantRange &CR1, const ConstantRange &CR2) { in TEST_F() argument
2303 return CR1.umul_sat(CR2); in TEST_F()
2310 [](const ConstantRange &CR1, const ConstantRange &CR2) { in TEST_F() argument
2311 return CR1.ushl_sat(CR2); in TEST_F()
2318 [](const ConstantRange &CR1, const ConstantRange &CR2) { in TEST_F() argument
2319 return CR1.sadd_sat(CR2); in TEST_F()
2328 [](const ConstantRange &CR1, const ConstantRange &CR2) { in TEST_F() argument
2329 return CR1.ssub_sat(CR2); in TEST_F()
2338 [](const ConstantRange &CR1, const ConstantRange &CR2) { in TEST_F() argument
2339 return CR1.smul_sat(CR2); in TEST_F()
2346 [](const ConstantRange &CR1, const ConstantRange &CR2) { in TEST_F() argument
2347 return CR1.sshl_sat(CR2); in TEST_F()