[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
Fri Jul 21 07:01:57 PDT 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG38cdb007a501: Add missing SLEEF mappings to scalable vector functions for log2 and log2f (authored by mgabka).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155801/new/

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.542897.patch
Type: text/x-patch
Size: 2155 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230721/32b71800/attachment.bin>


More information about the llvm-commits mailing list