[PATCH] D92097: [RISCV] Basic jump table lowering

Nandor Licker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 26 05:07:27 PST 2020


nand added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp:126
 
-  BuildMI(NewMBB, DL, TII->get(RISCV::AUIPC), DestReg)
-      .addDisp(Symbol, 0, FlagsHi);
+  if (Symbol.isJTI()) {
+    BuildMI(NewMBB, DL, TII->get(RISCV::AUIPC), DestReg)
----------------
jrtc27 wrote:
> Why is it that expandAuipcInstPair needs to handle this specially but there's no corresponding logic for medlow's plain LUI/ADDI?
Based on my understanding, `addDisp` seems to be a generic method that produces an operand with an arbitrary offset from some reference, however it doesn't seem like offsets into jump tables are supported. Since the offset is always 0, the jump table index is handled separately. I might be wrong though.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92097



More information about the llvm-commits mailing list