[PATCH] D158759: [RISCV] Add a pass to rewrite rd to x0 for non-computational instrs whose return values are unused
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 16 10:42:52 PDT 2023
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVDeadRegisterDefinitions.cpp:92
+ MI.getOpcode() != RISCV::PseudoVSETIVLI) {
+ const TargetRegisterClass *RC = MRI->getRegClass(Reg);
+ if (!(RC && RC->contains(RISCV::X0))) {
----------------
Why are we using MRI->getRegClass instead of TII->getRegClass like AArch64?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158759/new/
https://reviews.llvm.org/D158759
More information about the llvm-commits
mailing list