[PATCH] D151284: [RISCV] Custom lower FP_TO_FP16 and FP16_TO_FP to correct ABI of of libcall

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 3 03:28:37 PDT 2023


asb added inline comments.


================
Comment at: llvm/test/CodeGen/RISCV/half-convert.ll:149
 ; RV64ID-NEXT:    fmv.x.w a0, fa0
+; RV64ID-NEXT:    fmv.w.x fa0, a0
 ; RV64ID-NEXT:    call __extendhfsf2 at plt
----------------
zixuan-wu wrote:
> why is there redundant  fmv.x.w/fmv.w.x?
We're presumably missing a combine or peephole to get rid of the redundant pair. This is a limitation noted in the patch description. As this patch is addressing a correctness issue,  and the suboptimal code quality isn't disastrous, it focuses solely on fixing the incorrect codegen. A follow-on patch can address this code quality issue.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151284



More information about the llvm-commits mailing list