[PATCH] D133810: [RISCV] Verify consistency of a couple TSFlags related to vector operands
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 14 07:38:38 PDT 2022
reames updated this revision to Diff 460086.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133810/new/
https://reviews.llvm.org/D133810
Files:
llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
Index: llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
===================================================================
--- llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
+++ llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
@@ -1220,6 +1220,15 @@
}
}
+ uint64_t TSFlags = MI.getDesc().TSFlags;
+ if (RISCVII::hasVLOp(TSFlags) && !RISCVII::hasSEWOp(TSFlags)) {
+ ErrInfo = "VL operand w/o SEW operand?";
+ return false;
+ }
+ if (RISCVII::hasVecPolicyOp(TSFlags) && !RISCVII::hasVLOp(TSFlags)) {
+ ErrInfo = "policy operand w/o VL operand?";
+ return false;
+ }
return true;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133810.460086.patch
Type: text/x-patch
Size: 591 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220914/5e045f3b/attachment.bin>
More information about the llvm-commits
mailing list