[PATCH] D90575: [RISCV] Add missing patterns for rotr with immediate for Zbb/Zbp extensions.

Fraser Cormack via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 3 00:59:31 PST 2020


frasercrmck accepted this revision.
frasercrmck added a comment.
This revision is now accepted and ready to land.

LGTM otherwise.



================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoB.td:52
+def ImmROTL2R : SDNodeXForm<imm, [{
+  uint64_t XLen = Subtarget->is64Bit() ? 64 : 32;
+  return CurDAG->getTargetConstant(XLen - N->getZExtValue(), SDLoc(N),
----------------
As far as I can tell, `Subtarget->getXLen()` would do the job here. However, I also see that `uimmlog2xlen` uses `is64Bit` so I'm not sure what to recommend.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90575



More information about the llvm-commits mailing list