Skip to content

Commit 36d5692

Browse files
authored
Revert "[TLI] Add support for hypot libcall." (#114312)
Reverts #113724
1 parent 50c4447 commit 36d5692

File tree

6 files changed

+0
-44
lines changed

6 files changed

+0
-44
lines changed

llvm/include/llvm/Analysis/TargetLibraryInfo.def

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1671,21 +1671,6 @@ TLI_DEFINE_ENUM_INTERNAL(htons)
16711671
TLI_DEFINE_STRING_INTERNAL("htons")
16721672
TLI_DEFINE_SIG_INTERNAL(Int16, Int16)
16731673

1674-
/// double hypot(double x, double y);
1675-
TLI_DEFINE_ENUM_INTERNAL(hypot)
1676-
TLI_DEFINE_STRING_INTERNAL("hypot")
1677-
TLI_DEFINE_SIG_INTERNAL(Dbl, Dbl, Dbl)
1678-
1679-
/// float hypotf(float x, float y);
1680-
TLI_DEFINE_ENUM_INTERNAL(hypotf)
1681-
TLI_DEFINE_STRING_INTERNAL("hypotf")
1682-
TLI_DEFINE_SIG_INTERNAL(Flt, Flt, Flt)
1683-
1684-
/// long double hypotl(long double x, long double y);
1685-
TLI_DEFINE_ENUM_INTERNAL(hypotl)
1686-
TLI_DEFINE_STRING_INTERNAL("hypotl")
1687-
TLI_DEFINE_SIG_INTERNAL(LDbl, LDbl, LDbl)
1688-
16891674
/// int iprintf(const char *format, ...);
16901675
TLI_DEFINE_ENUM_INTERNAL(iprintf)
16911676
TLI_DEFINE_STRING_INTERNAL("iprintf")

llvm/lib/Analysis/TargetLibraryInfo.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,6 @@ static void initializeLibCalls(TargetLibraryInfoImpl &TLI, const Triple &T,
300300
TLI.setUnavailable(LibFunc_expf);
301301
TLI.setUnavailable(LibFunc_floorf);
302302
TLI.setUnavailable(LibFunc_fmodf);
303-
TLI.setUnavailable(LibFunc_hypotf);
304303
TLI.setUnavailable(LibFunc_log10f);
305304
TLI.setUnavailable(LibFunc_logf);
306305
TLI.setUnavailable(LibFunc_modff);
@@ -332,7 +331,6 @@ static void initializeLibCalls(TargetLibraryInfoImpl &TLI, const Triple &T,
332331
TLI.setUnavailable(LibFunc_floorl);
333332
TLI.setUnavailable(LibFunc_fmodl);
334333
TLI.setUnavailable(LibFunc_frexpl);
335-
TLI.setUnavailable(LibFunc_hypotl);
336334
TLI.setUnavailable(LibFunc_ldexpl);
337335
TLI.setUnavailable(LibFunc_log10l);
338336
TLI.setUnavailable(LibFunc_logl);

llvm/lib/Transforms/Utils/BuildLibCalls.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,9 +1215,6 @@ bool llvm::inferNonMandatoryLibFuncAttrs(Function &F,
12151215
case LibFunc_fmod:
12161216
case LibFunc_fmodf:
12171217
case LibFunc_fmodl:
1218-
case LibFunc_hypot:
1219-
case LibFunc_hypotf:
1220-
case LibFunc_hypotl:
12211218
case LibFunc_isascii:
12221219
case LibFunc_isdigit:
12231220
case LibFunc_labs:

llvm/test/Transforms/InferFunctionAttrs/annotate.ll

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -589,15 +589,6 @@ declare ptr @gets(ptr)
589589
; CHECK: declare noundef i32 @gettimeofday(ptr nocapture noundef, ptr nocapture noundef) [[NOFREE_NOUNWIND]]
590590
declare i32 @gettimeofday(ptr, ptr)
591591

592-
; CHECK: declare double @hypot(double, double) [[NOFREE_NOUNWIND_WILLRETURN_WRITEONLY]]
593-
declare double @hypot(double, double)
594-
595-
; CHECK: declare float @hypotf(float, float) [[NOFREE_NOUNWIND_WILLRETURN_WRITEONLY]]
596-
declare float @hypotf(float, float)
597-
598-
; CHECK: declare x86_fp80 @hypotl(x86_fp80, x86_fp80) [[NOFREE_NOUNWIND_WILLRETURN_WRITEONLY]]
599-
declare x86_fp80 @hypotl(x86_fp80, x86_fp80)
600-
601592
; CHECK: declare i32 @isascii(i32) [[NOFREE_NOUNWIND_WILLRETURN_WRITEONLY]]
602593
declare i32 @isascii(i32)
603594

llvm/test/tools/llvm-tli-checker/ps4-tli-check.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -602,18 +602,6 @@ DynamicSymbols:
602602
Type: STT_FUNC
603603
Section: .text
604604
Binding: STB_GLOBAL
605-
- Name: hypot
606-
Type: STT_FUNC
607-
Section: .text
608-
Binding: STB_GLOBAL
609-
- Name: hypotf
610-
Type: STT_FUNC
611-
Section: .text
612-
Binding: STB_GLOBAL
613-
- Name: hypotl
614-
Type: STT_FUNC
615-
Section: .text
616-
Binding: STB_GLOBAL
617605
- Name: isdigit
618606
Type: STT_FUNC
619607
Section: .text

llvm/unittests/Analysis/TargetLibraryInfoTest.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,6 @@ TEST_F(TargetLibraryInfoTest, ValidProto) {
249249
"declare %struct* @getpwnam(i8*)\n"
250250
"declare i8* @gets(i8*)\n"
251251
"declare i32 @gettimeofday(%struct*, i8*)\n"
252-
"declare double @hypot(double, double)\n"
253-
"declare float @hypotf(float, float)\n"
254-
"declare x86_fp80 @hypotl(x86_fp80, x86_fp80)\n"
255252
"declare i32 @_Z7isasciii(i32)\n"
256253
"declare i32 @_Z7isdigiti(i32)\n"
257254
"declare i64 @labs(i64)\n"

0 commit comments

Comments
 (0)