[llvm] [SandboxVec][DAG] Update DAG when a new instruction is created (PR #126124)

Sriraman Tallam via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 6 14:01:29 PST 2025


================
@@ -87,6 +87,14 @@ define void @foo(i8 %v0) {
   EXPECT_FALSE(One.contains(I1));
   EXPECT_FALSE(One.contains(I2));
   EXPECT_FALSE(One.contains(Ret));
+  // Check touches().
+  {
+    sandboxir::Interval<sandboxir::Instruction> Intvl(I2, I2);
+    EXPECT_TRUE(Intvl.touches(I1));
+    EXPECT_FALSE(Intvl.touches(I2));
+    EXPECT_TRUE(Intvl.touches(Ret));
+    EXPECT_FALSE(Intvl.touches(I0));
+  }
----------------
tmsri wrote:

Maybe a EXPECT_TRUE(Intvl.contains(I2)); here for clarity.

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


More information about the llvm-commits mailing list