[llvm] [Verifier] Accept range assume bundles (PR #202586)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 9 05:12:27 PDT 2026


================
@@ -6135,6 +6135,21 @@ void Verifier::visitIntrinsicCall(Intrinsic::ID ID, CallBase &Call) {
         Check(OBU.Inputs.size() == 1,
               "noundef assumptions should have 1 argument", Call);
         break;
+      case BundleAttr::Range:
+        Check(OBU.Inputs.size() == 3,
+              "range assumptions should have 3 arguments", Call);
+        Check(GetTypeAt(0)->isIntegerTy(),
+              "first argument should be an integer", Call);
+        Check(isa<ConstantInt>(OBU.Inputs[1]),
+              "second argument should be a constant integer", Call);
+        Check(isa<ConstantInt>(OBU.Inputs[2]),
+              "third argument should be a constant integer", Call);
----------------
nikic wrote:

Why the limitation to constants?

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


More information about the llvm-commits mailing list