[PATCH] D110418: [TargetLibraryInfo] Correctly handle sqrt*_finite
Paul Robinson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 24 07:22:01 PDT 2021
probinson created this revision.
probinson added a reviewer: spatel.
Herald added subscribers: pengfei, hiraditya.
probinson requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Other <math>_finite calls are marked as unavailable except on GNU/Linux;
it looks like the sqrt set was just overlooked.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D110418
Files:
llvm/lib/Analysis/TargetLibraryInfo.cpp
llvm/test/CodeGen/X86/sqrt-fastmath.ll
Index: llvm/test/CodeGen/X86/sqrt-fastmath.ll
===================================================================
--- llvm/test/CodeGen/X86/sqrt-fastmath.ll
+++ llvm/test/CodeGen/X86/sqrt-fastmath.ll
@@ -1,7 +1,7 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
-; RUN: llc < %s -mtriple=x86_64-- -mcpu=x86-64 -mattr=+sse2 | FileCheck %s --check-prefix=CHECK --check-prefix=SSE
-; RUN: llc < %s -mtriple=x86_64-- -mcpu=x86-64 -mattr=+avx | FileCheck %s --check-prefix=CHECK --check-prefix=AVX --check-prefix=AVX1
-; RUN: llc < %s -mtriple=x86_64-- -mcpu=x86-64 -mattr=+avx512f | FileCheck %s --check-prefix=CHECK --check-prefix=AVX --check-prefix=AVX512
+; RUN: llc < %s -mtriple=x86_64--linux-gnu -mcpu=x86-64 -mattr=+sse2 | FileCheck %s --check-prefix=CHECK --check-prefix=SSE
+; RUN: llc < %s -mtriple=x86_64--linux-gnu -mcpu=x86-64 -mattr=+avx | FileCheck %s --check-prefix=CHECK --check-prefix=AVX --check-prefix=AVX1
+; RUN: llc < %s -mtriple=x86_64--linux-gnu -mcpu=x86-64 -mattr=+avx512f | FileCheck %s --check-prefix=CHECK --check-prefix=AVX --check-prefix=AVX512
declare double @__sqrt_finite(double)
declare float @__sqrtf_finite(float)
Index: llvm/lib/Analysis/TargetLibraryInfo.cpp
===================================================================
--- llvm/lib/Analysis/TargetLibraryInfo.cpp
+++ llvm/lib/Analysis/TargetLibraryInfo.cpp
@@ -573,6 +573,9 @@
TLI.setUnavailable(LibFunc_sinh_finite);
TLI.setUnavailable(LibFunc_sinhf_finite);
TLI.setUnavailable(LibFunc_sinhl_finite);
+ TLI.setUnavailable(LibFunc_sqrt_finite);
+ TLI.setUnavailable(LibFunc_sqrtf_finite);
+ TLI.setUnavailable(LibFunc_sqrtl_finite);
}
if ((T.isOSLinux() && T.isGNUEnvironment()) ||
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110418.374844.patch
Type: text/x-patch
Size: 1749 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210924/89a02c55/attachment.bin>
More information about the llvm-commits
mailing list