[all-commits] [llvm/llvm-project] 839c82: [LegalizeTypes][RISCV][X86] Legalize FP_ROUND to l...

Craig Topper via All-commits all-commits at lists.llvm.org
Tue Dec 10 22:22:10 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 839c8217b989a22908fdd1ec48105ff22d655fb2
      https://github.com/llvm/llvm-project/commit/839c8217b989a22908fdd1ec48105ff22d655fb2
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2024-12-10 (Tue, 10 Dec 2024)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
    M llvm/test/CodeGen/RISCV/half-convert-strict.ll
    M llvm/test/CodeGen/RISCV/half-convert.ll
    M llvm/test/CodeGen/X86/bfloat.ll

  Log Message:
  -----------
  [LegalizeTypes][RISCV][X86] Legalize FP_ROUND to libcall in SoftPromoteHalfRes_FP_ROUND if the input type is softened. (#119481)

Previously we created an FP_TO_FP16 and legalized it in
SoftenFloatOp_FP_ROUND. This caused i16 to be sent to call lowering
instead of f16. This results in the ABI not being followed if f16 is
supposed to be passed in a different register than i16.

Looking at the libgcc binary for the library function it appears the value
is returned in xmm0 so the X86 test was being miscompiled before.

Fixes #107607.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list