Skip to content

Revert "[X86][BF16] Add libcall for F80 -> BF16" #109140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion compiler-rt/lib/builtins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ set(GENERIC_SOURCES
set(BF16_SOURCES
extendbfsf2.c
truncdfbf2.c
truncxfbf2.c
truncsfbf2.c
)

Expand Down
13 changes: 0 additions & 13 deletions compiler-rt/lib/builtins/truncxfbf2.c

This file was deleted.

1 change: 0 additions & 1 deletion llvm/include/llvm/IR/RuntimeLibcalls.def
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,6 @@ HANDLE_LIBCALL(FPROUND_F128_F16, "__trunctfhf2")
HANDLE_LIBCALL(FPROUND_PPCF128_F16, "__trunctfhf2")
HANDLE_LIBCALL(FPROUND_F32_BF16, "__truncsfbf2")
HANDLE_LIBCALL(FPROUND_F64_BF16, "__truncdfbf2")
HANDLE_LIBCALL(FPROUND_F80_BF16, "__truncxfbf2")
HANDLE_LIBCALL(FPROUND_F64_F32, "__truncdfsf2")
HANDLE_LIBCALL(FPROUND_F80_F32, "__truncxfsf2")
HANDLE_LIBCALL(FPROUND_F128_F32, "__trunctfsf2")
Expand Down
2 changes: 0 additions & 2 deletions llvm/lib/CodeGen/TargetLoweringBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,6 @@ RTLIB::Libcall RTLIB::getFPROUND(EVT OpVT, EVT RetVT) {
return FPROUND_F32_BF16;
if (OpVT == MVT::f64)
return FPROUND_F64_BF16;
if (OpVT == MVT::f80)
return FPROUND_F80_BF16;
} else if (RetVT == MVT::f32) {
if (OpVT == MVT::f64)
return FPROUND_F64_F32;
Expand Down
22 changes: 0 additions & 22 deletions llvm/test/CodeGen/X86/bfloat.ll
Original file line number Diff line number Diff line change
Expand Up @@ -1953,25 +1953,3 @@ define void @PR92471(ptr %0, ptr %1) nounwind {
store <7 x float> %4, ptr %1, align 4
ret void
}

define bfloat @PR108936(x86_fp80 %0) nounwind {
; X86-LABEL: PR108936:
; X86: # %bb.0:
; X86-NEXT: subl $12, %esp
; X86-NEXT: fldt {{[0-9]+}}(%esp)
; X86-NEXT: fstpt (%esp)
; X86-NEXT: calll __truncxfbf2
; X86-NEXT: addl $12, %esp
; X86-NEXT: retl
;
; CHECK-LABEL: PR108936:
; CHECK: # %bb.0:
; CHECK-NEXT: subq $24, %rsp
; CHECK-NEXT: fldt {{[0-9]+}}(%rsp)
; CHECK-NEXT: fstpt (%rsp)
; CHECK-NEXT: callq __truncxfbf2@PLT
; CHECK-NEXT: addq $24, %rsp
; CHECK-NEXT: retq
%2 = fptrunc x86_fp80 %0 to bfloat
ret bfloat %2
}
Loading