[PATCH] D135403: [RISCV] Verify that policy operands only exist on instructions with tied passthru operands
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 6 15:19:04 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG027516553da4: [RISCV] Verify that policy operands only exist on instructions with tied… (authored by reames).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135403/new/
https://reviews.llvm.org/D135403
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
@@ -1266,6 +1266,15 @@
ErrInfo = "policy operand w/o VL operand?";
return false;
}
+
+ // VecPolicy operands can only exist on instructions with passthru/merge
+ // arguments. Note that not all arguments with passthru have vec policy
+ // operands- some instructions have implicit policies.
+ unsigned UseOpIdx;
+ if (!MI.isRegTiedToUseOperand(0, &UseOpIdx)) {
+ ErrInfo = "policy operand w/o tied operand?";
+ return false;
+ }
}
return true;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135403.465898.patch
Type: text/x-patch
Size: 705 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221006/e482b581/attachment.bin>
More information about the llvm-commits
mailing list