[PATCH] D155801: [TLI][AArch64] Add missing SLEEF mappings to scalable vector functions for log2 and log2f
mgabka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 20 01:43:22 PDT 2023
mgabka created this revision.
mgabka added reviewers: paulwalker-arm, pawosm01.
Herald added a subscriber: kristof.beyls.
Herald added a project: All.
mgabka requested review of this revision.
Herald added subscribers: llvm-commits, wangpc, alextsao1999.
Herald added a project: LLVM.
In the original commit adding SLEEF mappings, https://reviews.llvm.org/D146839
mappings for log2/log2f were missing.
https://reviews.llvm.org/D155801
Files:
llvm/include/llvm/Analysis/VecFuncs.def
llvm/test/Transforms/LoopVectorize/AArch64/sleef-calls-aarch64.ll
Index: llvm/test/Transforms/LoopVectorize/AArch64/sleef-calls-aarch64.ll
===================================================================
--- llvm/test/Transforms/LoopVectorize/AArch64/sleef-calls-aarch64.ll
+++ llvm/test/Transforms/LoopVectorize/AArch64/sleef-calls-aarch64.ll
@@ -648,8 +648,9 @@
define void @log2_f64(double* nocapture %varray) {
; CHECK-LABEL: @log2_f64(
- ; CHECK: [[TMP5:%.*]] = call <2 x double> @_ZGVnN2v_log2(<2 x double> [[TMP4:%.*]])
- ; CHECK: ret void
+ ; NEON: [[TMP5:%.*]] = call <2 x double> @_ZGVnN2v_log2(<2 x double> [[TMP4:%.*]])
+ ; SVE: [[TMP5:%.*]] = call <vscale x 2 x double> @_ZGVsMxv_log2(<vscale x 2 x double> [[TMP4:%.*]], <vscale x 2 x i1> {{.*}})
+ ; CHECK: ret void
;
entry:
br label %for.body
@@ -671,8 +672,9 @@
define void @log2_f32(float* nocapture %varray) {
; CHECK-LABEL: @log2_f32(
- ; CHECK: [[TMP5:%.*]] = call <4 x float> @_ZGVnN4v_log2f(<4 x float> [[TMP4:%.*]])
- ; CHECK: ret void
+ ; NEON: [[TMP5:%.*]] = call <4 x float> @_ZGVnN4v_log2f(<4 x float> [[TMP4:%.*]])
+ ; SVE: [[TMP5:%.*]] = call <vscale x 4 x float> @_ZGVsMxv_log2f(<vscale x 4 x float> [[TMP4:%.*]], <vscale x 4 x i1> {{.*}})
+ ; CHECK: ret void
;
entry:
br label %for.body
Index: llvm/include/llvm/Analysis/VecFuncs.def
===================================================================
--- llvm/include/llvm/Analysis/VecFuncs.def
+++ llvm/include/llvm/Analysis/VecFuncs.def
@@ -652,6 +652,11 @@
TLI_DEFINE_VECFUNC("llvm.log.f64", "_ZGVsMxv_log", SCALABLE(2), MASKED)
TLI_DEFINE_VECFUNC("llvm.log.f32", "_ZGVsMxv_logf", SCALABLE(4), MASKED)
+TLI_DEFINE_VECFUNC( "log2", "_ZGVsMxv_log2", SCALABLE(2), MASKED)
+TLI_DEFINE_VECFUNC( "log2f", "_ZGVsMxv_log2f", SCALABLE(4), MASKED)
+TLI_DEFINE_VECFUNC( "llvm.log2.f64", "_ZGVsMxv_log2", SCALABLE(2), MASKED)
+TLI_DEFINE_VECFUNC( "llvm.log2.f32", "_ZGVsMxv_log2f", SCALABLE(4), MASKED)
+
TLI_DEFINE_VECFUNC("log10", "_ZGVsMxv_log10", SCALABLE(2), MASKED)
TLI_DEFINE_VECFUNC("log10f", "_ZGVsMxv_log10f", SCALABLE(4), MASKED)
TLI_DEFINE_VECFUNC("llvm.log10.f64", "_ZGVsMxv_log10", SCALABLE(2), MASKED)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155801.542371.patch
Type: text/x-patch
Size: 2155 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230720/5fedec88/attachment.bin>
More information about the llvm-commits
mailing list