[PATCH] D119928: [RISCV] transform MI to W variant to remove sext.w
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 21 10:26:32 PDT 2022
craig.topper added inline comments.
Herald added a subscriber: StephenFan.
================
Comment at: llvm/lib/Target/RISCV/RISCVSExtWRemoval.cpp:256
+ return true;
+ } else if (isAllUsesReadW(MI, MRI)) {
+ // transform to ADDIW
----------------
Drop else after return.
================
Comment at: llvm/lib/Target/RISCV/RISCVSExtWRemoval.cpp:276
+ // SLLIW reads the lowest 5 bits, while SLLI reads lowest 6 bits
+ if ((uint32_t)MI.getOperand(2).getImm() >= 32)
+ return false;
----------------
Why do we need a cast to `uint32_t` here?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119928/new/
https://reviews.llvm.org/D119928
More information about the llvm-commits
mailing list