[PATCH] D129402: [RISCV] Teach shouldConvertConstantLoadToIntImm that constant materialization can use constant pools.
Luís Marques via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 8 15:28:27 PDT 2022
luismarques added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:1169
+ unsigned BitSize = Ty->getIntegerBitWidth();
+ if (BitSize == 0 || BitSize > Subtarget.getXLen())
+ return false;
----------------
Why do we gate this for `BitSize == 0`? (I know other targets do the same)
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:1178
+ // Prefer to keep the load if it would require many instructions.
+ // This ues the same threshold we use for constant pools but doesn't
+ // check useConstantPoolForLargeInts.
----------------
Nit: "uses"
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129402/new/
https://reviews.llvm.org/D129402
More information about the llvm-commits
mailing list