[PATCH] D97970: [RISCV] Make the hasStdExtM() check in RISCVInstrInfo::getVLENFactoredAmount a fatal error rather than an assert.

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 4 11:51:46 PST 2021


jrtc27 added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfo.cpp:1200
-    assert(MF.getSubtarget<RISCVSubtarget>().hasStdExtM() &&
-           "M-extension must be enabled to calculate the vscaled size/offset.");
     BuildMI(MBB, II, DL, TII->get(RISCV::MUL), FactorRegister)
----------------
```
MF.getFunction().getContext().diagnose(DiagnosticInfoUnsupported{
    MF.getFunction(),
    "M-extension must ..."});
```
perhaps, if you want a friendlier experience?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97970



More information about the llvm-commits mailing list