[llvm] [GlobalISel] Add G_STEP_VECTOR instruction (PR #115598)
Thorsten Schütt via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 9 22:15:58 PST 2024
================
@@ -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;
+ }
----------------
tschuett wrote:
For step=0, we create a step vector of all zeros. The canonical representation is a splat vector of zeros. It would loose the stepping property.
https://github.com/llvm/llvm-project/pull/115598
More information about the llvm-commits
mailing list