[PATCH] D133869: [RISCV] Verify SEW/VecPolicy immediate values

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 14 13:01:34 PDT 2022


reames added a comment.

In D133869#3790380 <https://reviews.llvm.org/D133869#3790380>, @asb wrote:

> @reames what's your thinking about the current asserts in the printing code - to keep them, or not?

Had not planned to remove them.  A data point is that the verifier does not use that printing path, so having them doesn't influence verification failures.



================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfo.cpp:1225
+  if (RISCVII::hasSEWOp(TSFlags)) {
+    unsigned OpIdx = RISCVII::getSEWOpNum(MI.getDesc());
+    unsigned Log2SEW = MI.getOperand(OpIdx).getImm();
----------------
craig.topper wrote:
> MI.getDesc() here should be the same as `Desc` 2 lines up. But it looks like we took the long way to create `Desc` at the top of this function.
Will reuse, update pending.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133869/new/

https://reviews.llvm.org/D133869



More information about the llvm-commits mailing list