[llvm] [GlobalISel] Add G_STEP_VECTOR instruction (PR #115598)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 9 22:23:09 PST 2024


Thorsten =?utf-8?q?Schütt?= <schuett at gmail.com>,
Thorsten =?utf-8?q?Schütt?= <schuett at gmail.com>,
Thorsten =?utf-8?q?Schütt?= <schuett at gmail.com>,
Thorsten =?utf-8?q?Schütt?= <schuett at gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/115598 at github.com>


================
@@ -1729,6 +1729,36 @@ void MachineVerifier::verifyPreISelGenericInstruction(const MachineInstr *MI) {
     }
     break;
   }
+  case TargetOpcode::G_STEP_VECTOR: {
+    if (!MI->getOperand(1).isCImm()) {
+      report("operand must be cimm", MI);
+      break;
+    }
+
+    if (!MI->getOperand(1).getCImm()->getValue().isStrictlyPositive()) {
+      report("step must be >= 0", MI);
+      break;
+    }
----------------
topperc wrote:

So the message should say `> 0` not `>= 0`?

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


More information about the llvm-commits mailing list