[PATCH] D142953: [RISCV] Don't use constantpool for floating-point value if the value can be easily constructed by integer sequence and a floating-point move.

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 2 12:35:43 PST 2023


reames added inline comments.


================
Comment at: llvm/test/CodeGen/RISCV/float-round-conv.ll:131
 ; RV32IF:       # %bb.0:
-; RV32IF-NEXT:    addi sp, sp, -16
-; RV32IF-NEXT:    .cfi_def_cfa_offset 16
-; RV32IF-NEXT:    sw ra, 12(sp) # 4-byte Folded Spill
-; RV32IF-NEXT:    .cfi_offset ra, -4
-; RV32IF-NEXT:    lui a0, %hi(.LCPI7_0)
-; RV32IF-NEXT:    flw ft0, %lo(.LCPI7_0)(a0)
+; RV32IF-NEXT:    lui a0, 307200
+; RV32IF-NEXT:    fmv.w.x ft0, a0
----------------
craig.topper wrote:
> reames wrote:
> > Not directly related to this patch, but these test diffs make it look like a constant pool load is blocking stack setup/tear down optimization.  (Sorry, there's a particular name for this optimization, but my brain is blanking right now.)  We should probably fix that separately.
> Shrink wrap?
Yep, that was it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142953



More information about the llvm-commits mailing list