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

Zixuan Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 3 18:52:55 PDT 2023


zixuan-wu 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
----------------
asb wrote:
> 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.
OK, sorry that I missed the description.


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