Skip to content

Commit

Permalink
[PowerPC] Fix incorrect symbol name of frexp libcall (#71626)
Browse files Browse the repository at this point in the history
frexpl is for ppc_fp128. The correct symbol name for f128 is frexpf128.
  • Loading branch information
ecnelises authored Nov 8, 2023
1 parent 0a21144 commit 5f29555
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions llvm/lib/Target/PowerPC/PPCISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1427,6 +1427,7 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
setLibcallName(RTLIB::LLRINT_F128, "llrintf128");
setLibcallName(RTLIB::NEARBYINT_F128, "nearbyintf128");
setLibcallName(RTLIB::FMA_F128, "fmaf128");
setLibcallName(RTLIB::FREXP_F128, "frexpf128");

if (Subtarget.isAIXABI()) {
setLibcallName(RTLIB::MEMCPY, isPPC64 ? "___memmove64" : "___memmove");
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/CodeGen/PowerPC/f128-arith.ll
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,7 @@ define dso_local fp128 @qpFREXP(ptr %a, ptr %b) {
; CHECK-NEXT: addi r5, r1, 44
; CHECK-NEXT: mr r30, r4
; CHECK-NEXT: lxv v2, 0(r3)
; CHECK-NEXT: bl frexpl
; CHECK-NEXT: bl frexpf128
; CHECK-NEXT: nop
; CHECK-NEXT: lwz r3, 44(r1)
; CHECK-NEXT: stw r3, 0(r30)
Expand All @@ -1343,7 +1343,7 @@ define dso_local fp128 @qpFREXP(ptr %a, ptr %b) {
; CHECK-P8-NEXT: mr r30, r4
; CHECK-P8-NEXT: lxvd2x vs0, 0, r3
; CHECK-P8-NEXT: xxswapd v2, vs0
; CHECK-P8-NEXT: bl frexpl
; CHECK-P8-NEXT: bl frexpf128
; CHECK-P8-NEXT: nop
; CHECK-P8-NEXT: lwz r3, 44(r1)
; CHECK-P8-NEXT: stw r3, 0(r30)
Expand Down

0 comments on commit 5f29555

Please sign in to comment.