Skip to content

Commit

Permalink
fp128 -> half uses __trunctfhf2 but should be __trunckfhf2
Browse files Browse the repository at this point in the history
  • Loading branch information
EsmeYi committed Jul 22, 2024
1 parent 2684fc1 commit 40b97f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions llvm/lib/CodeGen/TargetLoweringBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,10 @@ void TargetLoweringBase::InitLibcalls(const Triple &TT) {
setLibcallName(RTLIB::MUL_F128, "__mulkf3");
setLibcallName(RTLIB::DIV_F128, "__divkf3");
setLibcallName(RTLIB::POWI_F128, "__powikf2");
setLibcallName(RTLIB::FPEXT_F16_F128, "__extendhfkf2");
setLibcallName(RTLIB::FPEXT_F32_F128, "__extendsfkf2");
setLibcallName(RTLIB::FPEXT_F64_F128, "__extenddfkf2");
setLibcallName(RTLIB::FPROUND_F128_F16, "__trunckfhf2");
setLibcallName(RTLIB::FPROUND_F128_F32, "__trunckfsf2");
setLibcallName(RTLIB::FPROUND_F128_F64, "__trunckfdf2");
setLibcallName(RTLIB::FPTOSINT_F128_I32, "__fixkfsi");
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/CodeGen/PowerPC/f16-to-from-f128.ll
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ define half @trunc(fp128 %a) unnamed_addr {
; P8-NEXT: std r0, 48(r1)
; P8-NEXT: .cfi_def_cfa_offset 32
; P8-NEXT: .cfi_offset lr, 16
; P8-NEXT: bl __trunctfhf2
; P8-NEXT: bl __trunckfhf2
; P8-NEXT: nop
; P8-NEXT: clrldi r3, r3, 48
; P8-NEXT: bl __gnu_h2f_ieee
Expand All @@ -43,7 +43,7 @@ define half @trunc(fp128 %a) unnamed_addr {
; SOFT-NEXT: std r0, 48(r1)
; SOFT-NEXT: .cfi_def_cfa_offset 32
; SOFT-NEXT: .cfi_offset lr, 16
; SOFT-NEXT: bl __trunctfhf2
; SOFT-NEXT: bl __trunckfhf2
; SOFT-NEXT: nop
; SOFT-NEXT: clrldi r3, r3, 48
; SOFT-NEXT: bl __gnu_h2f_ieee
Expand Down

0 comments on commit 40b97f3

Please sign in to comment.