[PATCH] D114950: [RISCV] Promote large integers to constant pool
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 13 11:19:37 PST 2021
craig.topper added a comment.
Do we have a test case that shows the bug @asb found with "zero" previously? I skimmed the tests but I might have missed it.
================
Comment at: llvm/lib/Target/RISCV/RISCVSubtarget.cpp:53
+static cl::opt<bool> RVVEnablePromoteIntToConstantPool(
+ "riscv-enable-promote-int-to-constant-pool",
----------------
Make this a disable flag that defaults to 0.
================
Comment at: llvm/lib/Target/RISCV/RISCVSubtarget.cpp:123
+bool RISCVSubtarget::enablePromoteIntToConstantPool() const {
+ return RVVEnablePromoteIntToConstantPool;
----------------
I'm not sure Promote is clear term in this context. Something like `useConstantPoolForLargeInts` might be better?
================
Comment at: llvm/test/CodeGen/RISCV/double-imm.ll:8
define double @double_imm() nounwind {
; TODO: Should probably prefer fld or ld on RV64 rather than materialising an
; expensive constant.
----------------
Seems like this TODO is addressed by this patch?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114950/new/
https://reviews.llvm.org/D114950
More information about the llvm-commits
mailing list