[PATCH] D47610: [TargetLibraryInfo] add mappings from LLVM sin/cos intrinsics to SVML calls
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 7 11:25:45 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL334211: [TargetLibraryInfo] add mappings from LLVM sin/cos intrinsics to SVML calls (authored by spatel, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D47610?vs=149376&id=150368#toc
Repository:
rL LLVM
https://reviews.llvm.org/D47610
Files:
llvm/trunk/lib/Analysis/TargetLibraryInfo.cpp
llvm/trunk/test/Transforms/LoopVectorize/X86/svml-calls.ll
Index: llvm/trunk/test/Transforms/LoopVectorize/X86/svml-calls.ll
===================================================================
--- llvm/trunk/test/Transforms/LoopVectorize/X86/svml-calls.ll
+++ llvm/trunk/test/Transforms/LoopVectorize/X86/svml-calls.ll
@@ -77,7 +77,7 @@
define void @sin_f64_intrinsic(double* nocapture %varray) {
; CHECK-LABEL: @sin_f64_intrinsic(
-; CHECK: [[TMP5:%.*]] = call <4 x double> @llvm.sin.v4f64(<4 x double> [[TMP4:%.*]])
+; CHECK: [[TMP5:%.*]] = call <4 x double> @__svml_sin4(<4 x double> [[TMP4:%.*]])
; CHECK: ret void
;
entry:
@@ -100,7 +100,7 @@
define void @sin_f32_intrinsic(float* nocapture %varray) {
; CHECK-LABEL: @sin_f32_intrinsic(
-; CHECK: [[TMP5:%.*]] = call <4 x float> @llvm.sin.v4f32(<4 x float> [[TMP4:%.*]])
+; CHECK: [[TMP5:%.*]] = call <4 x float> @__svml_sinf4(<4 x float> [[TMP4:%.*]])
; CHECK: ret void
;
entry:
@@ -169,7 +169,7 @@
define void @cos_f64_intrinsic(double* nocapture %varray) {
; CHECK-LABEL: @cos_f64_intrinsic(
-; CHECK: [[TMP5:%.*]] = call <4 x double> @llvm.cos.v4f64(<4 x double> [[TMP4:%.*]])
+; CHECK: [[TMP5:%.*]] = call <4 x double> @__svml_cos4(<4 x double> [[TMP4:%.*]])
; CHECK: ret void
;
entry:
@@ -192,7 +192,7 @@
define void @cos_f32_intrinsic(float* nocapture %varray) {
; CHECK-LABEL: @cos_f32_intrinsic(
-; CHECK: [[TMP5:%.*]] = call <4 x float> @llvm.cos.v4f32(<4 x float> [[TMP4:%.*]])
+; CHECK: [[TMP5:%.*]] = call <4 x float> @__svml_cosf4(<4 x float> [[TMP4:%.*]])
; CHECK: ret void
;
entry:
Index: llvm/trunk/lib/Analysis/TargetLibraryInfo.cpp
===================================================================
--- llvm/trunk/lib/Analysis/TargetLibraryInfo.cpp
+++ llvm/trunk/lib/Analysis/TargetLibraryInfo.cpp
@@ -1461,14 +1461,30 @@
{"sinf", "__svml_sinf8", 8},
{"sinf", "__svml_sinf16", 16},
+ {"llvm.sin.f64", "__svml_sin2", 2},
+ {"llvm.sin.f64", "__svml_sin4", 4},
+ {"llvm.sin.f64", "__svml_sin8", 8},
+
+ {"llvm.sin.f32", "__svml_sinf4", 4},
+ {"llvm.sin.f32", "__svml_sinf8", 8},
+ {"llvm.sin.f32", "__svml_sinf16", 16},
+
{"cos", "__svml_cos2", 2},
{"cos", "__svml_cos4", 4},
{"cos", "__svml_cos8", 8},
{"cosf", "__svml_cosf4", 4},
{"cosf", "__svml_cosf8", 8},
{"cosf", "__svml_cosf16", 16},
+ {"llvm.cos.f64", "__svml_cos2", 2},
+ {"llvm.cos.f64", "__svml_cos4", 4},
+ {"llvm.cos.f64", "__svml_cos8", 8},
+
+ {"llvm.cos.f32", "__svml_cosf4", 4},
+ {"llvm.cos.f32", "__svml_cosf8", 8},
+ {"llvm.cos.f32", "__svml_cosf16", 16},
+
{"pow", "__svml_pow2", 2},
{"pow", "__svml_pow4", 4},
{"pow", "__svml_pow8", 8},
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47610.150368.patch
Type: text/x-patch
Size: 2777 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180607/864965e6/attachment.bin>
More information about the llvm-commits
mailing list