[llvm] Add ConstantRangeList::unionWith() and ::intersectWith() (PR #96547)

Haopeng Liu via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 24 17:58:40 PDT 2024


================
@@ -94,4 +94,122 @@ TEST_F(ConstantRangeListTest, Insert) {
   EXPECT_TRUE(CRL == Expected);
 }
 
+ConstantRangeList GetCRL(const SmallVector<std::pair<APInt, APInt>, 2> &Pairs) {
----------------
haopliu wrote:

Ah, it works! I thought ArrayRef requires specifying the explicit type at callsites.
Then, with ArrayRef, each callsite creates a temp std::vector var by default?

https://github.com/llvm/llvm-project/pull/96547


More information about the llvm-commits mailing list