[llvm] 15ee17c - [SLP] Move more X86 tests to common directory (#111134)

via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 4 05:19:00 PDT 2024


Author: Elvina Yakubova
Date: 2024-10-04T13:18:56+01:00
New Revision: 15ee17c3ce34623261788d7de3c1bdf5860be34e

URL: https://github.com/llvm/llvm-project/commit/15ee17c3ce34623261788d7de3c1bdf5860be34e
DIFF: https://github.com/llvm/llvm-project/commit/15ee17c3ce34623261788d7de3c1bdf5860be34e.diff

LOG: [SLP] Move more X86 tests to common directory (#111134)

Some of the tests from the X86 directory can be generalized to improve
coverage for other architectures (cont.)

Added: 
    llvm/test/Transforms/SLPVectorizer/addsub.ll
    llvm/test/Transforms/SLPVectorizer/consecutive-access.ll
    llvm/test/Transforms/SLPVectorizer/extract-subvector-long-input.ll
    llvm/test/Transforms/SLPVectorizer/extract-vectorized-operand.ll
    llvm/test/Transforms/SLPVectorizer/extract_with_non_const_index.ll
    llvm/test/Transforms/SLPVectorizer/icmp-altopcode-after-reordering.ll
    llvm/test/Transforms/SLPVectorizer/insert-shuffle.ll
    llvm/test/Transforms/SLPVectorizer/limit.ll
    llvm/test/Transforms/SLPVectorizer/operand-is-reduced-val.ll
    llvm/test/Transforms/SLPVectorizer/reduced-gathered-vectorized.ll
    llvm/test/Transforms/SLPVectorizer/reduction-min-select.ll
    llvm/test/Transforms/SLPVectorizer/reduction_loads.ll
    llvm/test/Transforms/SLPVectorizer/reorder-node.ll
    llvm/test/Transforms/SLPVectorizer/return.ll
    llvm/test/Transforms/SLPVectorizer/reused-scalar-in-multi-node.ll
    llvm/test/Transforms/SLPVectorizer/revec-reduction-logical.ll
    llvm/test/Transforms/SLPVectorizer/same-scalars-reordered-in-reduction.ll
    llvm/test/Transforms/SLPVectorizer/several_store_chains.ll
    llvm/test/Transforms/SLPVectorizer/shuffle-mask-resized.ll
    llvm/test/Transforms/SLPVectorizer/splat-buildvector.ll
    llvm/test/Transforms/SLPVectorizer/vectorize-reorder-alt-shuffle.ll
    llvm/test/Transforms/SLPVectorizer/vectorize-reordered-list.ll

Modified: 
    

Removed: 
    llvm/test/Transforms/SLPVectorizer/X86/addsub.ll
    llvm/test/Transforms/SLPVectorizer/X86/consecutive-access.ll
    llvm/test/Transforms/SLPVectorizer/X86/extract-subvector-long-input.ll
    llvm/test/Transforms/SLPVectorizer/X86/extract-vectorized-operand.ll
    llvm/test/Transforms/SLPVectorizer/X86/extract_with_non_const_index.ll
    llvm/test/Transforms/SLPVectorizer/X86/icmp-altopcode-after-reordering.ll
    llvm/test/Transforms/SLPVectorizer/X86/insert-shuffle.ll
    llvm/test/Transforms/SLPVectorizer/X86/limit.ll
    llvm/test/Transforms/SLPVectorizer/X86/operand-is-reduced-val.ll
    llvm/test/Transforms/SLPVectorizer/X86/reduced-gathered-vectorized.ll
    llvm/test/Transforms/SLPVectorizer/X86/reduction-min-select.ll
    llvm/test/Transforms/SLPVectorizer/X86/reduction_loads.ll
    llvm/test/Transforms/SLPVectorizer/X86/reorder-node.ll
    llvm/test/Transforms/SLPVectorizer/X86/return.ll
    llvm/test/Transforms/SLPVectorizer/X86/reused-scalar-in-multi-node.ll
    llvm/test/Transforms/SLPVectorizer/X86/revec-reduction-logical.ll
    llvm/test/Transforms/SLPVectorizer/X86/same-scalars-reordered-in-reduction.ll
    llvm/test/Transforms/SLPVectorizer/X86/several_store_chains.ll
    llvm/test/Transforms/SLPVectorizer/X86/shuffle-mask-resized.ll
    llvm/test/Transforms/SLPVectorizer/X86/splat-buildvector.ll
    llvm/test/Transforms/SLPVectorizer/X86/vectorize-reorder-alt-shuffle.ll
    llvm/test/Transforms/SLPVectorizer/X86/vectorize-reordered-list.ll


################################################################################
diff  --git a/llvm/test/Transforms/SLPVectorizer/X86/addsub.ll b/llvm/test/Transforms/SLPVectorizer/addsub.ll
similarity index 98%
rename from llvm/test/Transforms/SLPVectorizer/X86/addsub.ll
rename to llvm/test/Transforms/SLPVectorizer/addsub.ll
index 96b498ced7d0f8..3961250d564518 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/addsub.ll
+++ b/llvm/test/Transforms/SLPVectorizer/addsub.ll
@@ -1,7 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -passes=slp-vectorizer -S | FileCheck %s
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-unknown-linux-gnu"
+; RUN: %if x86-registered-target %{ opt < %s -passes=slp-vectorizer -S -mtriple=x86_64-unknown-linux-gnu | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt < %s -passes=slp-vectorizer -S -mtriple=aarch64-unknown-linux-gnu | FileCheck %s %}
 
 @b = common global [4 x i32] zeroinitializer, align 16
 @c = common global [4 x i32] zeroinitializer, align 16

diff  --git a/llvm/test/Transforms/SLPVectorizer/X86/consecutive-access.ll b/llvm/test/Transforms/SLPVectorizer/consecutive-access.ll
similarity index 86%
rename from llvm/test/Transforms/SLPVectorizer/X86/consecutive-access.ll
rename to llvm/test/Transforms/SLPVectorizer/consecutive-access.ll
index 2e733930650eaa..369ca28ece55b8 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/consecutive-access.ll
+++ b/llvm/test/Transforms/SLPVectorizer/consecutive-access.ll
@@ -1,7 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -passes=slp-vectorizer -S | FileCheck %s
-target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-apple-macosx10.9.0"
+; RUN: %if x86-registered-target %{ opt < %s -passes=slp-vectorizer -S -mtriple=x86_64-apple-macosx10.9.0 | FileCheck %s --check-prefixes=CHECK-X86 %}
+; RUN: %if aarch64-registered-target %{ opt < %s -passes=slp-vectorizer -S -mtriple=aarch64-unknown-linux-gnu | FileCheck %s --check-prefixes=CHECK-AARCH64 %}
 
 @A = common global [2000 x double] zeroinitializer, align 16
 @B = common global [2000 x double] zeroinitializer, align 16
@@ -440,27 +439,55 @@ for.end:                                          ; preds = %for.cond.for.end_cr
 ; Make sure we are able to vectorize this from now on:
 ;
 define double @bar(ptr nocapture readonly %a, i32 %n) local_unnamed_addr #0 {
-; CHECK-LABEL: @bar(
-; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[CMP15:%.*]] = icmp eq i32 [[N:%.*]], 0
-; CHECK-NEXT:    br i1 [[CMP15]], label [[FOR_COND_CLEANUP:%.*]], label [[FOR_BODY:%.*]]
-; CHECK:       for.cond.cleanup:
-; CHECK-NEXT:    [[TMP0:%.*]] = phi <2 x double> [ zeroinitializer, [[ENTRY:%.*]] ], [ [[TMP5:%.*]], [[FOR_BODY]] ]
-; CHECK-NEXT:    [[TMP1:%.*]] = extractelement <2 x double> [[TMP0]], i32 0
-; CHECK-NEXT:    [[TMP2:%.*]] = extractelement <2 x double> [[TMP0]], i32 1
-; CHECK-NEXT:    [[MUL:%.*]] = fmul double [[TMP1]], [[TMP2]]
-; CHECK-NEXT:    ret double [[MUL]]
-; CHECK:       for.body:
-; CHECK-NEXT:    [[I_018:%.*]] = phi i32 [ [[ADD5:%.*]], [[FOR_BODY]] ], [ 0, [[ENTRY]] ]
-; CHECK-NEXT:    [[TMP3:%.*]] = phi <2 x double> [ [[TMP5]], [[FOR_BODY]] ], [ zeroinitializer, [[ENTRY]] ]
-; CHECK-NEXT:    [[IDXPROM:%.*]] = zext i32 [[I_018]] to i64
-; CHECK-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds double, ptr [[A:%.*]], i64 [[IDXPROM]]
-; CHECK-NEXT:    [[TMP4:%.*]] = load <2 x double>, ptr [[ARRAYIDX]], align 8
-; CHECK-NEXT:    [[TMP5]] = fadd <2 x double> [[TMP3]], [[TMP4]]
-; CHECK-NEXT:    [[ADD5]] = add i32 [[I_018]], 2
-; CHECK-NEXT:    [[CMP:%.*]] = icmp ult i32 [[ADD5]], [[N]]
-; CHECK-NEXT:    br i1 [[CMP]], label [[FOR_BODY]], label [[FOR_COND_CLEANUP]]
+; CHECK-X86-LABEL: @bar(
+; CHECK-X86-NEXT:  entry:
+; CHECK-X86-NEXT:    [[CMP15:%.*]] = icmp eq i32 [[N:%.*]], 0
+; CHECK-X86-NEXT:    br i1 [[CMP15]], label [[FOR_COND_CLEANUP:%.*]], label [[FOR_BODY:%.*]]
+; CHECK-X86:       for.cond.cleanup:
+; CHECK-X86-NEXT:    [[TMP0:%.*]] = phi <2 x double> [ zeroinitializer, [[ENTRY:%.*]] ], [ [[TMP5:%.*]], [[FOR_BODY]] ]
+; CHECK-X86-NEXT:    [[TMP1:%.*]] = extractelement <2 x double> [[TMP0]], i32 0
+; CHECK-X86-NEXT:    [[TMP2:%.*]] = extractelement <2 x double> [[TMP0]], i32 1
+; CHECK-X86-NEXT:    [[MUL:%.*]] = fmul double [[TMP1]], [[TMP2]]
+; CHECK-X86-NEXT:    ret double [[MUL]]
+; CHECK-X86:       for.body:
+; CHECK-X86-NEXT:    [[I_018:%.*]] = phi i32 [ [[ADD5:%.*]], [[FOR_BODY]] ], [ 0, [[ENTRY]] ]
+; CHECK-X86-NEXT:    [[TMP3:%.*]] = phi <2 x double> [ [[TMP5]], [[FOR_BODY]] ], [ zeroinitializer, [[ENTRY]] ]
+; CHECK-X86-NEXT:    [[IDXPROM:%.*]] = zext i32 [[I_018]] to i64
+; CHECK-X86-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds double, ptr [[A:%.*]], i64 [[IDXPROM]]
+; CHECK-X86-NEXT:    [[TMP4:%.*]] = load <2 x double>, ptr [[ARRAYIDX]], align 8
+; CHECK-X86-NEXT:    [[TMP5]] = fadd <2 x double> [[TMP3]], [[TMP4]]
+; CHECK-X86-NEXT:    [[ADD5]] = add i32 [[I_018]], 2
+; CHECK-X86-NEXT:    [[CMP:%.*]] = icmp ult i32 [[ADD5]], [[N]]
+; CHECK-X86-NEXT:    br i1 [[CMP]], label [[FOR_BODY]], label [[FOR_COND_CLEANUP]]
 ;
+
+; CHECK-AARCH64-LABEL: @bar(
+; CHECK-AARCH64-NEXT:  entry:
+; CHECK-AARCH64-NEXT:    [[CMP15:%.*]] = icmp eq i32 [[N:%.*]], 0
+; CHECK-AARCH64-NEXT:    br i1 [[CMP15]], label [[FOR_COND_CLEANUP:%.*]], label [[FOR_BODY:%.*]]
+; CHECK-AARCH64:       for.cond.cleanup:
+; CHECK-AARCH64-NEXT:    [[X_0_LCSSA:%.*]] = phi double [ 0.000000e+00, [[ENTRY:%.*]] ], [ [[ADD:%.*]], [[FOR_BODY]] ]
+; CHECK-AARCH64-NEXT:    [[Y_0_LCSSA:%.*]] = phi double [ 0.000000e+00, [[ENTRY]] ], [ [[ADD4:%.*]], [[FOR_BODY]] ]
+; CHECK-AARCH64-NEXT:    [[MUL:%.*]] = fmul double [[X_0_LCSSA]], [[Y_0_LCSSA]]
+; CHECK-AARCH64-NEXT:    ret double [[MUL]]
+; CHECK-AARCH64:       for.body:
+; CHECK-AARCH64-NEXT:    [[I_018:%.*]] = phi i32 [ [[ADD5:%.*]], [[FOR_BODY]] ], [ 0, [[ENTRY]] ]
+; CHECK-AARCH64-NEXT:    [[Y_017:%.*]] = phi double [ [[ADD4]], [[FOR_BODY]] ], [ 0.000000e+00, [[ENTRY]] ]
+; CHECK-AARCH64-NEXT:    [[X_016:%.*]] = phi double [ [[ADD]], [[FOR_BODY]] ], [ 0.000000e+00, [[ENTRY]] ]
+; CHECK-AARCH64-NEXT:    [[IDXPROM:%.*]] = zext i32 [[I_018]] to i64
+; CHECK-AARCH64-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds double, ptr [[A:%.*]], i64 [[IDXPROM]]
+; CHECK-AARCH64-NEXT:    [[TMP0:%.*]] = load double, ptr [[ARRAYIDX]], align 8
+; CHECK-AARCH64-NEXT:    [[ADD]] = fadd double [[X_016]], [[TMP0]]
+; CHECK-AARCH64-NEXT:    [[ADD1:%.*]] = or disjoint i32 [[I_018]], 1
+; CHECK-AARCH64-NEXT:    [[IDXPROM2:%.*]] = zext i32 [[ADD1]] to i64
+; CHECK-AARCH64-NEXT:    [[ARRAYIDX3:%.*]] = getelementptr inbounds double, ptr [[A]], i64 [[IDXPROM2]]
+; CHECK-AARCH64-NEXT:    [[TMP1:%.*]] = load double, ptr [[ARRAYIDX3]], align 8
+; CHECK-AARCH64-NEXT:    [[ADD4]] = fadd double [[Y_017]], [[TMP1]]
+; CHECK-AARCH64-NEXT:    [[ADD5]] = add i32 [[I_018]], 2
+; CHECK-AARCH64-NEXT:    [[CMP:%.*]] = icmp ult i32 [[ADD5]], [[N]]
+; CHECK-AARCH64-NEXT:    br i1 [[CMP]], label [[FOR_BODY]], label [[FOR_COND_CLEANUP]]
+;
+
 entry:
   %cmp15 = icmp eq i32 %n, 0
   br i1 %cmp15, label %for.cond.cleanup, label %for.body

diff  --git a/llvm/test/Transforms/SLPVectorizer/X86/extract-subvector-long-input.ll b/llvm/test/Transforms/SLPVectorizer/extract-subvector-long-input.ll
similarity index 89%
rename from llvm/test/Transforms/SLPVectorizer/X86/extract-subvector-long-input.ll
rename to llvm/test/Transforms/SLPVectorizer/extract-subvector-long-input.ll
index f90456297d7cb9..a1f4590a569196 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/extract-subvector-long-input.ll
+++ b/llvm/test/Transforms/SLPVectorizer/extract-subvector-long-input.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
-; RUN: opt -passes=slp-vectorizer -S -slp-threshold=-99999 -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
+; RUN: %if x86-registered-target %{ opt -passes=slp-vectorizer -S -slp-threshold=-99999 -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt -passes=slp-vectorizer -S -slp-threshold=-99999 -mtriple=aarch64-unknown-linux-gnu < %s | FileCheck %s %}
 
 define void @test() {
 ; CHECK-LABEL: define void @test() {

diff  --git a/llvm/test/Transforms/SLPVectorizer/X86/extract-vectorized-operand.ll b/llvm/test/Transforms/SLPVectorizer/extract-vectorized-operand.ll
similarity index 86%
rename from llvm/test/Transforms/SLPVectorizer/X86/extract-vectorized-operand.ll
rename to llvm/test/Transforms/SLPVectorizer/extract-vectorized-operand.ll
index 7a860719505f05..910754f9901997 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/extract-vectorized-operand.ll
+++ b/llvm/test/Transforms/SLPVectorizer/extract-vectorized-operand.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
-; RUN: opt -S --passes=slp-vectorizer -slp-threshold=-99999 < %s -mtriple=x86_64-unknown-linux-gnu | FileCheck %s
+; RUN: %if x86-registered-target %{ opt -S --passes=slp-vectorizer -slp-threshold=-99999 < %s -mtriple=x86_64-unknown-linux-gnu | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt -S --passes=slp-vectorizer -slp-threshold=-99999 < %s -mtriple=aarch64-unknown-linux-gnu | FileCheck %s %}
 
 define void @test() {
 ; CHECK-LABEL: define void @test() {

diff  --git a/llvm/test/Transforms/SLPVectorizer/X86/extract_with_non_const_index.ll b/llvm/test/Transforms/SLPVectorizer/extract_with_non_const_index.ll
similarity index 90%
rename from llvm/test/Transforms/SLPVectorizer/X86/extract_with_non_const_index.ll
rename to llvm/test/Transforms/SLPVectorizer/extract_with_non_const_index.ll
index 8277ca193540c9..55378991d8a8e4 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/extract_with_non_const_index.ll
+++ b/llvm/test/Transforms/SLPVectorizer/extract_with_non_const_index.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -mtriple=x86_64-unknown -passes=slp-vectorizer -S | FileCheck %s
+; RUN: %if x86-registered-target %{ opt < %s -mtriple=x86_64-unknown -passes=slp-vectorizer -S | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt < %s -mtriple=aarch64-unknown -passes=slp-vectorizer -S | FileCheck %s %}
 
 ; Reproducer for an issue discussed here:
 ; https://reviews.llvm.org/D108703#2974289

diff  --git a/llvm/test/Transforms/SLPVectorizer/X86/icmp-altopcode-after-reordering.ll b/llvm/test/Transforms/SLPVectorizer/icmp-altopcode-after-reordering.ll
similarity index 90%
rename from llvm/test/Transforms/SLPVectorizer/X86/icmp-altopcode-after-reordering.ll
rename to llvm/test/Transforms/SLPVectorizer/icmp-altopcode-after-reordering.ll
index 17fe501391e1a3..61e3c6cdb88613 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/icmp-altopcode-after-reordering.ll
+++ b/llvm/test/Transforms/SLPVectorizer/icmp-altopcode-after-reordering.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
-; RUN: opt -S --passes=slp-vectorizer -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
+; RUN: %if x86-registered-target %{ opt -S --passes=slp-vectorizer -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt -S --passes=slp-vectorizer -mtriple=aarch64-unknown-linux-gnu < %s | FileCheck %s %}
 
 define i32 @test(ptr %sptr, i64 %0) {
 ; CHECK-LABEL: define i32 @test(

diff  --git a/llvm/test/Transforms/SLPVectorizer/X86/insert-shuffle.ll b/llvm/test/Transforms/SLPVectorizer/insert-shuffle.ll
similarity index 91%
rename from llvm/test/Transforms/SLPVectorizer/X86/insert-shuffle.ll
rename to llvm/test/Transforms/SLPVectorizer/insert-shuffle.ll
index 99df7c7130ffa8..2d6e83b4add41e 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/insert-shuffle.ll
+++ b/llvm/test/Transforms/SLPVectorizer/insert-shuffle.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -passes=slp-vectorizer -S -o - -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
+; RUN: %if x86-registered-target %{ opt -passes=slp-vectorizer -S -o - -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt -passes=slp-vectorizer -S -o - -mtriple=aarch64-unknown-linux-gnu < %s | FileCheck %s %}
 
 %struct.sw = type { float, float, float, float }
 

diff  --git a/llvm/test/Transforms/SLPVectorizer/X86/limit.ll b/llvm/test/Transforms/SLPVectorizer/limit.ll
similarity index 93%
rename from llvm/test/Transforms/SLPVectorizer/X86/limit.ll
rename to llvm/test/Transforms/SLPVectorizer/limit.ll
index 78ccd17608dafe..b2c9ccb55d87b8 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/limit.ll
+++ b/llvm/test/Transforms/SLPVectorizer/limit.ll
@@ -1,8 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -passes=slp-vectorizer -S | FileCheck %s
-
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-unknown-linux-gnu"
+; RUN: %if x86-registered-target %{ opt < %s -passes=slp-vectorizer -S -mtriple=x86_64-unknown-linux-gnu | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt < %s -passes=slp-vectorizer -S -mtriple=aarch64-unknown-linux-gnu | FileCheck %s %}
 
 @b = common global [4 x i32] zeroinitializer, align 16
 @c = common global [4 x i32] zeroinitializer, align 16

diff  --git a/llvm/test/Transforms/SLPVectorizer/X86/operand-is-reduced-val.ll b/llvm/test/Transforms/SLPVectorizer/operand-is-reduced-val.ll
similarity index 88%
rename from llvm/test/Transforms/SLPVectorizer/X86/operand-is-reduced-val.ll
rename to llvm/test/Transforms/SLPVectorizer/operand-is-reduced-val.ll
index 5fcac3fbf3bafe..408dda2211b8d1 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/operand-is-reduced-val.ll
+++ b/llvm/test/Transforms/SLPVectorizer/operand-is-reduced-val.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
-; RUN: opt -S --passes=slp-vectorizer -mtriple=x86_64-unknown-linux < %s -slp-threshold=-10 | FileCheck %s
+; RUN: %if x86-registered-target %{ opt -S --passes=slp-vectorizer -mtriple=x86_64-unknown-linux < %s -slp-threshold=-10 | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt -S --passes=slp-vectorizer -mtriple=aarch64-unknown-linux < %s -slp-threshold=-10 | FileCheck %s %}
 
 define i64 @src(i32 %a) {
 ; CHECK-LABEL: define i64 @src(

diff  --git a/llvm/test/Transforms/SLPVectorizer/X86/reduced-gathered-vectorized.ll b/llvm/test/Transforms/SLPVectorizer/reduced-gathered-vectorized.ll
similarity index 90%
rename from llvm/test/Transforms/SLPVectorizer/X86/reduced-gathered-vectorized.ll
rename to llvm/test/Transforms/SLPVectorizer/reduced-gathered-vectorized.ll
index 31f0e065cf77de..02ec2b18365018 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/reduced-gathered-vectorized.ll
+++ b/llvm/test/Transforms/SLPVectorizer/reduced-gathered-vectorized.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -passes=slp-vectorizer -S -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
+; RUN: %if x86-registered-target %{ opt -passes=slp-vectorizer -S -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt -passes=slp-vectorizer -S -mtriple=aarch64-unknown-linux-gnu < %s | FileCheck %s %}
 
 define i16 @test() {
 ; CHECK-LABEL: @test(

diff  --git a/llvm/test/Transforms/SLPVectorizer/X86/reduction-min-select.ll b/llvm/test/Transforms/SLPVectorizer/reduction-min-select.ll
similarity index 80%
rename from llvm/test/Transforms/SLPVectorizer/X86/reduction-min-select.ll
rename to llvm/test/Transforms/SLPVectorizer/reduction-min-select.ll
index cb62f2a45baace..669e05e10886d8 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/reduction-min-select.ll
+++ b/llvm/test/Transforms/SLPVectorizer/reduction-min-select.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -passes=slp-vectorizer -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
+; RUN: %if x86-registered-target %{ opt -S -passes=slp-vectorizer -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt -S -passes=slp-vectorizer -mtriple=aarch64-unknown-linux-gnu < %s | FileCheck %s %}
 
 define void @test() {
 ; CHECK-LABEL: @test(

diff  --git a/llvm/test/Transforms/SLPVectorizer/X86/reduction_loads.ll b/llvm/test/Transforms/SLPVectorizer/reduction_loads.ll
similarity index 97%
rename from llvm/test/Transforms/SLPVectorizer/X86/reduction_loads.ll
rename to llvm/test/Transforms/SLPVectorizer/reduction_loads.ll
index 8b2b15283601a2..1b37c0a77e94e0 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/reduction_loads.ll
+++ b/llvm/test/Transforms/SLPVectorizer/reduction_loads.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -passes=slp-vectorizer -S -mtriple=x86_64-apple-macosx10.10.0 -mattr=+sse4.2 | FileCheck %s
+; RUN: %if x86-registered-target %{ opt < %s -passes=slp-vectorizer -S -mtriple=x86_64-apple-macosx10.10.0 -mattr=+sse4.2 | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt < %s -passes=slp-vectorizer -S -mtriple=aarch64-unknown-linux-gnu -mattr=+neon | FileCheck %s %}
 
 ; PR28474
 

diff  --git a/llvm/test/Transforms/SLPVectorizer/X86/reorder-node.ll b/llvm/test/Transforms/SLPVectorizer/reorder-node.ll
similarity index 92%
rename from llvm/test/Transforms/SLPVectorizer/X86/reorder-node.ll
rename to llvm/test/Transforms/SLPVectorizer/reorder-node.ll
index 3a456798d7818d..dd583ab3c84ad6 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/reorder-node.ll
+++ b/llvm/test/Transforms/SLPVectorizer/reorder-node.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
-; RUN: opt -S --passes=slp-vectorizer -mtriple=x86_64-linux-gnu < %s | FileCheck %s
+; RUN: %if x86-registered-target %{ opt -S --passes=slp-vectorizer -mtriple=x86_64-linux-gnu < %s | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt -S --passes=slp-vectorizer -mtriple=aarch64-linux-gnu < %s | FileCheck %s %}
 
 define void @test(ptr noalias %arg, ptr noalias %arg1, ptr %arg2) {
 ; CHECK-LABEL: define void @test(

diff  --git a/llvm/test/Transforms/SLPVectorizer/X86/return.ll b/llvm/test/Transforms/SLPVectorizer/return.ll
similarity index 90%
rename from llvm/test/Transforms/SLPVectorizer/X86/return.ll
rename to llvm/test/Transforms/SLPVectorizer/return.ll
index 31b328ca2f5139..1ea4112eb6064d 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/return.ll
+++ b/llvm/test/Transforms/SLPVectorizer/return.ll
@@ -1,7 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -passes=slp-vectorizer -S | FileCheck %s
-target datalayout = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"
-target triple = "x86_64--linux-gnu"
+; RUN: %if x86-registered-target %{ opt < %s -passes=slp-vectorizer -S -mtriple=x86_64--linux-gnu | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt < %s -passes=slp-vectorizer -S -mtriple=aarch64-unknown-linux-gnu | FileCheck %s %}
 
 @a = common global [4 x double] zeroinitializer, align 8
 @b = common global [4 x double] zeroinitializer, align 8

diff  --git a/llvm/test/Transforms/SLPVectorizer/X86/reused-scalar-in-multi-node.ll b/llvm/test/Transforms/SLPVectorizer/reused-scalar-in-multi-node.ll
similarity index 90%
rename from llvm/test/Transforms/SLPVectorizer/X86/reused-scalar-in-multi-node.ll
rename to llvm/test/Transforms/SLPVectorizer/reused-scalar-in-multi-node.ll
index 13015a495a9187..229979f444d8b6 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/reused-scalar-in-multi-node.ll
+++ b/llvm/test/Transforms/SLPVectorizer/reused-scalar-in-multi-node.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 3
-; RUN: opt -S --passes=slp-vectorizer -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
+; RUN: %if x86-registered-target %{ opt -S --passes=slp-vectorizer -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt -S --passes=slp-vectorizer -mtriple=aarch64-unknown-linux-gnu < %s | FileCheck %s %}
 
 %struct.UFP = type { i32, i32, i32, [4 x i32] }
 

diff  --git a/llvm/test/Transforms/SLPVectorizer/X86/revec-reduction-logical.ll b/llvm/test/Transforms/SLPVectorizer/revec-reduction-logical.ll
similarity index 91%
rename from llvm/test/Transforms/SLPVectorizer/X86/revec-reduction-logical.ll
rename to llvm/test/Transforms/SLPVectorizer/revec-reduction-logical.ll
index dfe9799b2a7dec..25f161e9f12760 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/revec-reduction-logical.ll
+++ b/llvm/test/Transforms/SLPVectorizer/revec-reduction-logical.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -passes=slp-vectorizer -slp-revec -mtriple=x86_64 -S | FileCheck %s
+; RUN: %if x86-registered-target %{ opt < %s -passes=slp-vectorizer -slp-revec -mtriple=x86_64 -S | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt < %s -passes=slp-vectorizer -slp-revec -mtriple=aarch64-unknown-linux-gnu -S | FileCheck %s %}
 
 define i1 @logical_and_icmp_
diff _preds(<4 x i32> %x) {
 ; CHECK-LABEL: @logical_and_icmp_
diff _preds(

diff  --git a/llvm/test/Transforms/SLPVectorizer/X86/same-scalars-reordered-in-reduction.ll b/llvm/test/Transforms/SLPVectorizer/same-scalars-reordered-in-reduction.ll
similarity index 83%
rename from llvm/test/Transforms/SLPVectorizer/X86/same-scalars-reordered-in-reduction.ll
rename to llvm/test/Transforms/SLPVectorizer/same-scalars-reordered-in-reduction.ll
index bb00f753ddb1ff..e36aba4fd3a509 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/same-scalars-reordered-in-reduction.ll
+++ b/llvm/test/Transforms/SLPVectorizer/same-scalars-reordered-in-reduction.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
-; RUN: opt -S -passes=slp-vectorizer -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
+; RUN: %if x86-registered-target %{ opt -S -passes=slp-vectorizer -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt -S -passes=slp-vectorizer -mtriple=aarch64-unknown-linux-gnu < %s | FileCheck %s %}
 
 define i32 @test() {
 ; CHECK-LABEL: define i32 @test() {

diff  --git a/llvm/test/Transforms/SLPVectorizer/X86/several_store_chains.ll b/llvm/test/Transforms/SLPVectorizer/several_store_chains.ll
similarity index 87%
rename from llvm/test/Transforms/SLPVectorizer/X86/several_store_chains.ll
rename to llvm/test/Transforms/SLPVectorizer/several_store_chains.ll
index 32b322a8ae0fb5..3869075d357711 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/several_store_chains.ll
+++ b/llvm/test/Transforms/SLPVectorizer/several_store_chains.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -S -mtriple=x86_64-unknown -passes=slp-vectorizer | FileCheck %s
+; RUN: %if x86-registered-target %{ opt < %s -S -mtriple=x86_64-unknown -passes=slp-vectorizer | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt < %s -S -mtriple=aarch64-unknown -passes=slp-vectorizer | FileCheck %s %}
 
 ; Test for PR49898.
 define void @fusion_1506(ptr %temp_buf1) local_unnamed_addr {

diff  --git a/llvm/test/Transforms/SLPVectorizer/X86/shuffle-mask-resized.ll b/llvm/test/Transforms/SLPVectorizer/shuffle-mask-resized.ll
similarity index 85%
rename from llvm/test/Transforms/SLPVectorizer/X86/shuffle-mask-resized.ll
rename to llvm/test/Transforms/SLPVectorizer/shuffle-mask-resized.ll
index 7d493dac015a9c..732b50396a460d 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/shuffle-mask-resized.ll
+++ b/llvm/test/Transforms/SLPVectorizer/shuffle-mask-resized.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
-; RUN: opt -passes=slp-vectorizer -S -mtriple=x86_64-unknown-linux -slp-threshold=-10 < %s | FileCheck %s
+; RUN: %if x86-registered-target %{ opt -passes=slp-vectorizer -S -mtriple=x86_64-unknown-linux -slp-threshold=-10 < %s | FileCheck %s %}
+; RUN: %if aaarch64-registered-target %{ opt -passes=slp-vectorizer -S -mtriple=aarch64-unknown-linux -slp-threshold=-10 < %s | FileCheck %s %}
 
 define i32 @test() {
 ; CHECK-LABEL: define i32 @test() {

diff  --git a/llvm/test/Transforms/SLPVectorizer/X86/splat-buildvector.ll b/llvm/test/Transforms/SLPVectorizer/splat-buildvector.ll
similarity index 80%
rename from llvm/test/Transforms/SLPVectorizer/X86/splat-buildvector.ll
rename to llvm/test/Transforms/SLPVectorizer/splat-buildvector.ll
index 5e5981bdaaa804..7532cd728225d7 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/splat-buildvector.ll
+++ b/llvm/test/Transforms/SLPVectorizer/splat-buildvector.ll
@@ -1,5 +1,7 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
-; RUN: opt --passes=slp-vectorizer -S -mtriple=x86_64-unknown-linux-gnu %s -o - -slp-threshold=-100 | FileCheck %s
+; RUN: %if x86-registered-target %{ opt --passes=slp-vectorizer -S -mtriple=x86_64-unknown-linux-gnu %s -o - -slp-threshold=-100 | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt --passes=slp-vectorizer -S -mtriple=aarch64-unknown-linux-gnu %s -o - -slp-threshold=-100 | FileCheck %s %}
+
 declare i64 @llvm.smax.i64(i64, i64)
 
 define i8 @foo(i64 %val_i64_57) {

diff  --git a/llvm/test/Transforms/SLPVectorizer/X86/vectorize-reorder-alt-shuffle.ll b/llvm/test/Transforms/SLPVectorizer/vectorize-reorder-alt-shuffle.ll
similarity index 91%
rename from llvm/test/Transforms/SLPVectorizer/X86/vectorize-reorder-alt-shuffle.ll
rename to llvm/test/Transforms/SLPVectorizer/vectorize-reorder-alt-shuffle.ll
index 69cdbbdbd098bf..631adf1fa81d53 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/vectorize-reorder-alt-shuffle.ll
+++ b/llvm/test/Transforms/SLPVectorizer/vectorize-reorder-alt-shuffle.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -passes=slp-vectorizer -S -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
+; RUN: %if x86-registered-target %{ opt -passes=slp-vectorizer -S -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt -passes=slp-vectorizer -S -mtriple=aarch64-unknown-linux-gnu < %s | FileCheck %s %}
 
 define void @foo(ptr %c, ptr %d) {
 ; CHECK-LABEL: @foo(

diff  --git a/llvm/test/Transforms/SLPVectorizer/X86/vectorize-reordered-list.ll b/llvm/test/Transforms/SLPVectorizer/vectorize-reordered-list.ll
similarity index 84%
rename from llvm/test/Transforms/SLPVectorizer/X86/vectorize-reordered-list.ll
rename to llvm/test/Transforms/SLPVectorizer/vectorize-reordered-list.ll
index 4c3c712419a2e1..a251ec06d7472b 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/vectorize-reordered-list.ll
+++ b/llvm/test/Transforms/SLPVectorizer/vectorize-reordered-list.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S --passes=slp-vectorizer -mtriple=x86_64-unknown %s | FileCheck %s
+; RUN: %if x86-registered-target %{ opt -S --passes=slp-vectorizer -mtriple=x86_64-unknown %s | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt -S --passes=slp-vectorizer -mtriple=aarch64-unknown %s | FileCheck %s %}
 
 define void @test(ptr %isec) {
 ; CHECK-LABEL: @test(


        


More information about the llvm-commits mailing list