[llvm] LLVM/Test: Add vectorizing testcases for fminimumnum and fminimumnum (PR #133843)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 31 23:56:29 PDT 2025
================
@@ -0,0 +1,516 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
+; RUN: opt --passes=slp-vectorizer --mtriple=aarch64 -mattr="+neon" -S < %s | FileCheck %s
+
+ at input1_f32 = dso_local local_unnamed_addr global [9 x float] zeroinitializer, align 16
+ at input2_f32 = dso_local local_unnamed_addr global [9 x float] zeroinitializer, align 16
+ at output_f32 = dso_local local_unnamed_addr global [9 x float] zeroinitializer, align 16
+ at input1_f64 = dso_local local_unnamed_addr global [9 x double] zeroinitializer, align 16
+ at input2_f64 = dso_local local_unnamed_addr global [9 x double] zeroinitializer, align 16
+ at output_f64 = dso_local local_unnamed_addr global [9 x double] zeroinitializer, align 16
+ at input1_f16 = dso_local local_unnamed_addr global [9 x half] zeroinitializer, align 16
+ at input2_f16 = dso_local local_unnamed_addr global [9 x half] zeroinitializer, align 16
+ at output_f16 = dso_local local_unnamed_addr global [9 x half] zeroinitializer, align 16
----------------
arsenm wrote:
```suggestion
@input1_f32 = global [9 x float] zeroinitializer, align 16
@input2_f32 =global [9 x float] zeroinitializer, align 16
@output_f32 = global [9 x float] zeroinitializer, align 16
@input1_f64 = global [9 x double] zeroinitializer, align 16
@input2_f64 = global [9 x double] zeroinitializer, align 16
@output_f64 = global [9 x double] zeroinitializer, align 16
@input1_f16 = global [9 x half] zeroinitializer, align 16
@input2_f16 = global [9 x half] zeroinitializer, align 16
@output_f16 = global [9 x half] zeroinitializer, align 16
```
Can drop all the qualifiers on the globals (though in general I think the IR will be shorter if you just use function arguments for all these pointers)
https://github.com/llvm/llvm-project/pull/133843
More information about the llvm-commits
mailing list