[llvm] [SLP] Move more X86 tests to common directory (PR #109821)

Elvina Yakubova via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 24 08:54:49 PDT 2024


https://github.com/ElvinaYakubova created https://github.com/llvm/llvm-project/pull/109821

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

>From 404fa091c56c0a0f1d8f13cfc1de4877d96e7fdf Mon Sep 17 00:00:00 2001
From: Elvina Yakubova <eyakubova at nvidia.com>
Date: Tue, 24 Sep 2024 04:02:18 -0700
Subject: [PATCH] [SLP] Move more X86 tests to common directory

Some of the tests from the X86 directory can be generalized to improve
coverage for other architectures
---
 .../SLPVectorizer/{X86 => }/peek-through-shuffle.ll          | 3 ++-
 .../SLPVectorizer/{X86 => }/phi-node-bitwidt-op-not.ll       | 3 ++-
 .../Transforms/SLPVectorizer/{X86 => }/phi-undef-input.ll    | 3 ++-
 .../Transforms/SLPVectorizer/{X86 => }/postponed_gathers.ll  | 3 ++-
 .../SLPVectorizer/{X86 => }/pr31599-inseltpoison.ll          | 3 ++-
 llvm/test/Transforms/SLPVectorizer/{X86 => }/pr31599.ll      | 3 ++-
 .../{X86 => }/reduction-gather-non-scheduled-extracts.ll     | 3 ++-
 .../SLPVectorizer/{X86 => }/reduction-modified-values.ll     | 3 ++-
 .../SLPVectorizer/{X86 => }/reorder-clustered-node.ll        | 3 ++-
 .../SLPVectorizer/{X86 => }/reordered-top-scalars.ll         | 3 ++-
 .../SLPVectorizer/{X86 => }/reordering-single-phi.ll         | 3 ++-
 .../{X86 => }/reused-buildvector-matching-vectorized-node.ll | 3 ++-
 .../SLPVectorizer/{X86 => }/root-trunc-extract-reuse.ll      | 3 ++-
 .../{X86 => }/same-scalar-in-same-phi-extract.ll             | 3 ++-
 .../Transforms/SLPVectorizer/{X86 => }/scalarazied-result.ll | 3 ++-
 .../SLPVectorizer/{X86 => }/scalarization-overhead.ll        | 3 ++-
 .../SLPVectorizer/{X86 => }/shrink_after_reorder2.ll         | 3 ++-
 .../SLPVectorizer/{X86 => }/shuffle-multivector.ll           | 3 ++-
 .../Transforms/SLPVectorizer/{X86 => }/shufflebuilder-bug.ll | 3 ++-
 .../Transforms/SLPVectorizer/{X86 => }/stores-non-ordered.ll | 3 ++-
 .../Transforms/SLPVectorizer/{X86 => }/unknown-entries.ll    | 5 ++---
 .../SLPVectorizer/{X86 => }/zext-incoming-for-neg-icmp.ll    | 3 ++-
 22 files changed, 44 insertions(+), 24 deletions(-)
 rename llvm/test/Transforms/SLPVectorizer/{X86 => }/peek-through-shuffle.ll (85%)
 rename llvm/test/Transforms/SLPVectorizer/{X86 => }/phi-node-bitwidt-op-not.ll (94%)
 rename llvm/test/Transforms/SLPVectorizer/{X86 => }/phi-undef-input.ll (96%)
 rename llvm/test/Transforms/SLPVectorizer/{X86 => }/postponed_gathers.ll (90%)
 rename llvm/test/Transforms/SLPVectorizer/{X86 => }/pr31599-inseltpoison.ll (78%)
 rename llvm/test/Transforms/SLPVectorizer/{X86 => }/pr31599.ll (78%)
 rename llvm/test/Transforms/SLPVectorizer/{X86 => }/reduction-gather-non-scheduled-extracts.ll (85%)
 rename llvm/test/Transforms/SLPVectorizer/{X86 => }/reduction-modified-values.ll (83%)
 rename llvm/test/Transforms/SLPVectorizer/{X86 => }/reorder-clustered-node.ll (93%)
 rename llvm/test/Transforms/SLPVectorizer/{X86 => }/reordered-top-scalars.ll (83%)
 rename llvm/test/Transforms/SLPVectorizer/{X86 => }/reordering-single-phi.ll (93%)
 rename llvm/test/Transforms/SLPVectorizer/{X86 => }/reused-buildvector-matching-vectorized-node.ll (94%)
 rename llvm/test/Transforms/SLPVectorizer/{X86 => }/root-trunc-extract-reuse.ll (86%)
 rename llvm/test/Transforms/SLPVectorizer/{X86 => }/same-scalar-in-same-phi-extract.ll (88%)
 rename llvm/test/Transforms/SLPVectorizer/{X86 => }/scalarazied-result.ll (60%)
 rename llvm/test/Transforms/SLPVectorizer/{X86 => }/scalarization-overhead.ll (92%)
 rename llvm/test/Transforms/SLPVectorizer/{X86 => }/shrink_after_reorder2.ll (91%)
 rename llvm/test/Transforms/SLPVectorizer/{X86 => }/shuffle-multivector.ll (89%)
 rename llvm/test/Transforms/SLPVectorizer/{X86 => }/shufflebuilder-bug.ll (89%)
 rename llvm/test/Transforms/SLPVectorizer/{X86 => }/stores-non-ordered.ll (92%)
 rename llvm/test/Transforms/SLPVectorizer/{X86 => }/unknown-entries.ll (82%)
 rename llvm/test/Transforms/SLPVectorizer/{X86 => }/zext-incoming-for-neg-icmp.ll (89%)

diff --git a/llvm/test/Transforms/SLPVectorizer/X86/peek-through-shuffle.ll b/llvm/test/Transforms/SLPVectorizer/peek-through-shuffle.ll
similarity index 85%
rename from llvm/test/Transforms/SLPVectorizer/X86/peek-through-shuffle.ll
rename to llvm/test/Transforms/SLPVectorizer/peek-through-shuffle.ll
index c157f6117df959..839c1ebed6bcff 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/peek-through-shuffle.ll
+++ b/llvm/test/Transforms/SLPVectorizer/peek-through-shuffle.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-unknown-linux-gnu -o - | FileCheck %s
+; RUN: %if x86-registered-target %{ opt -S -passes=slp-vectorizer < %s -mtriple=x86_64-unknown-linux-gnu -o - | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt -S -passes=slp-vectorizer < %s -mtriple=aarch64-unknown-linux-gnu -o - | FileCheck %s %}
 
 define void @foo(ptr %0, <4 x float> %1) {
 ; CHECK-LABEL: @foo(
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/phi-node-bitwidt-op-not.ll b/llvm/test/Transforms/SLPVectorizer/phi-node-bitwidt-op-not.ll
similarity index 94%
rename from llvm/test/Transforms/SLPVectorizer/X86/phi-node-bitwidt-op-not.ll
rename to llvm/test/Transforms/SLPVectorizer/phi-node-bitwidt-op-not.ll
index f376ca71c77693..2037e0d67d2f89 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/phi-node-bitwidt-op-not.ll
+++ b/llvm/test/Transforms/SLPVectorizer/phi-node-bitwidt-op-not.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 %b, ptr %c, i32 %0, ptr %a, i1 %tobool3.not) {
 ; CHECK-LABEL: define i32 @test(
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/phi-undef-input.ll b/llvm/test/Transforms/SLPVectorizer/phi-undef-input.ll
similarity index 96%
rename from llvm/test/Transforms/SLPVectorizer/X86/phi-undef-input.ll
rename to llvm/test/Transforms/SLPVectorizer/phi-undef-input.ll
index 3cc32c1fc7b28e..b9802a0adb8aaf 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/phi-undef-input.ll
+++ b/llvm/test/Transforms/SLPVectorizer/phi-undef-input.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -passes=slp-vectorizer -slp-threshold=-1000 -mtriple=x86_64 -S | FileCheck %s
+; RUN: %if x86-registered-target %{ opt < %s -passes=slp-vectorizer -slp-threshold=-1000 -mtriple=x86_64 -S | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt < %s -passes=slp-vectorizer -slp-threshold=-1000 -mtriple=aarch64-unknown-linux-gnu -S | FileCheck %s %}
 
 ; The inputs to vector phi should remain undef.
 
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/postponed_gathers.ll b/llvm/test/Transforms/SLPVectorizer/postponed_gathers.ll
similarity index 90%
rename from llvm/test/Transforms/SLPVectorizer/X86/postponed_gathers.ll
rename to llvm/test/Transforms/SLPVectorizer/postponed_gathers.ll
index 488ca0b23cd9c5..f6bed797b9ba91 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/postponed_gathers.ll
+++ b/llvm/test/Transforms/SLPVectorizer/postponed_gathers.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 -slp-threshold=-10 -mtriple=x86_64-unknown-linux-gnu -S | FileCheck %s
+; RUN: %if x86-registered-target %{ opt < %s -passes=slp-vectorizer -slp-threshold=-10 -mtriple=x86_64-unknown-linux-gnu -S | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt < %s -passes=slp-vectorizer -slp-threshold=-10 -mtriple=aarch64-unknown-linux-gnu -S | FileCheck %s %}
 
 define void @foo() {
 ; CHECK-LABEL: define void @foo() {
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/pr31599-inseltpoison.ll b/llvm/test/Transforms/SLPVectorizer/pr31599-inseltpoison.ll
similarity index 78%
rename from llvm/test/Transforms/SLPVectorizer/X86/pr31599-inseltpoison.ll
rename to llvm/test/Transforms/SLPVectorizer/pr31599-inseltpoison.ll
index 5506f61fe134bd..fe5871d73cd5e2 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/pr31599-inseltpoison.ll
+++ b/llvm/test/Transforms/SLPVectorizer/pr31599-inseltpoison.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 <2 x float> @foo() {
 ; CHECK-LABEL: @foo(
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/pr31599.ll b/llvm/test/Transforms/SLPVectorizer/pr31599.ll
similarity index 78%
rename from llvm/test/Transforms/SLPVectorizer/X86/pr31599.ll
rename to llvm/test/Transforms/SLPVectorizer/pr31599.ll
index 348656e07c6be4..10b9b224d556e5 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/pr31599.ll
+++ b/llvm/test/Transforms/SLPVectorizer/pr31599.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 <2 x float> @foo() {
 ; CHECK-LABEL: @foo(
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/reduction-gather-non-scheduled-extracts.ll b/llvm/test/Transforms/SLPVectorizer/reduction-gather-non-scheduled-extracts.ll
similarity index 85%
rename from llvm/test/Transforms/SLPVectorizer/X86/reduction-gather-non-scheduled-extracts.ll
rename to llvm/test/Transforms/SLPVectorizer/reduction-gather-non-scheduled-extracts.ll
index 03c8767eff327f..f1034f39711351 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/reduction-gather-non-scheduled-extracts.ll
+++ b/llvm/test/Transforms/SLPVectorizer/reduction-gather-non-scheduled-extracts.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-sie-ps5 < %s | FileCheck %s
+; RUN: %if x86-registered-target %{ opt -S --passes=slp-vectorizer -mtriple=x86_64-sie-ps5 < %s | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt -S --passes=slp-vectorizer -mtriple=aarch64-unknown-linux-gnu < %s | FileCheck %s %}
 
 define void @tes() {
 ; CHECK-LABEL: define void @tes() {
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/reduction-modified-values.ll b/llvm/test/Transforms/SLPVectorizer/reduction-modified-values.ll
similarity index 83%
rename from llvm/test/Transforms/SLPVectorizer/X86/reduction-modified-values.ll
rename to llvm/test/Transforms/SLPVectorizer/reduction-modified-values.ll
index dbf490c5fe6a2f..be9318e467174a 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/reduction-modified-values.ll
+++ b/llvm/test/Transforms/SLPVectorizer/reduction-modified-values.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 i32 @test() {
 ; CHECK-LABEL: @test(
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/reorder-clustered-node.ll b/llvm/test/Transforms/SLPVectorizer/reorder-clustered-node.ll
similarity index 93%
rename from llvm/test/Transforms/SLPVectorizer/X86/reorder-clustered-node.ll
rename to llvm/test/Transforms/SLPVectorizer/reorder-clustered-node.ll
index 1a6ff2385905b3..561182d5e4f49d 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/reorder-clustered-node.ll
+++ b/llvm/test/Transforms/SLPVectorizer/reorder-clustered-node.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -passes=slp-vectorizer -S < %s -mtriple=x86_64 -slp-threshold=-150 | FileCheck %s
+; RUN: %if x86-registered-target %{ opt -passes=slp-vectorizer -S < %s -mtriple=x86_64 -slp-threshold=-150 | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt -passes=slp-vectorizer -S < %s -mtriple=aarch64-unknown-linux-gnu -slp-threshold=-150 | FileCheck %s %}
 
 define i1 @test(ptr %arg, ptr %i233, i64 %i241, ptr %i235, ptr %i237, ptr %i227) {
 ; CHECK-LABEL: @test(
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/reordered-top-scalars.ll b/llvm/test/Transforms/SLPVectorizer/reordered-top-scalars.ll
similarity index 83%
rename from llvm/test/Transforms/SLPVectorizer/X86/reordered-top-scalars.ll
rename to llvm/test/Transforms/SLPVectorizer/reordered-top-scalars.ll
index 4517d27598b603..1de5ee2298837a 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/reordered-top-scalars.ll
+++ b/llvm/test/Transforms/SLPVectorizer/reordered-top-scalars.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 -slp-threshold=-5 | FileCheck %s
+; RUN: %if x86-registered-target %{ opt -S --passes=slp-vectorizer -mtriple=x86_64-unknown %s -slp-threshold=-5 | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt -S --passes=slp-vectorizer -mtriple=aarch64-unknown %s -slp-threshold=-5 | FileCheck %s %}
 
 define i32 @test(ptr %isec) {
 ; CHECK-LABEL: @test(
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/reordering-single-phi.ll b/llvm/test/Transforms/SLPVectorizer/reordering-single-phi.ll
similarity index 93%
rename from llvm/test/Transforms/SLPVectorizer/X86/reordering-single-phi.ll
rename to llvm/test/Transforms/SLPVectorizer/reordering-single-phi.ll
index bc1eaaac5d1bbc..a70daf9cf8d60c 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/reordering-single-phi.ll
+++ b/llvm/test/Transforms/SLPVectorizer/reordering-single-phi.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 | FileCheck %s
+; RUN: %if x86-registered-target %{ opt -S --passes=slp-vectorizer -mtriple=x86_64-unknown-linux < %s | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt -S --passes=slp-vectorizer -mtriple=aarch64-unknown-linux < %s | FileCheck %s %}
 
 @a = external global [32000 x float], align 64
 
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/reused-buildvector-matching-vectorized-node.ll b/llvm/test/Transforms/SLPVectorizer/reused-buildvector-matching-vectorized-node.ll
similarity index 94%
rename from llvm/test/Transforms/SLPVectorizer/X86/reused-buildvector-matching-vectorized-node.ll
rename to llvm/test/Transforms/SLPVectorizer/reused-buildvector-matching-vectorized-node.ll
index 2b425ee624700f..3e00550a885215 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/reused-buildvector-matching-vectorized-node.ll
+++ b/llvm/test/Transforms/SLPVectorizer/reused-buildvector-matching-vectorized-node.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 void @blam(ptr %arg, double %load2, i1 %fcmp3) {
 ; CHECK-LABEL: define void @blam
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/root-trunc-extract-reuse.ll b/llvm/test/Transforms/SLPVectorizer/root-trunc-extract-reuse.ll
similarity index 86%
rename from llvm/test/Transforms/SLPVectorizer/X86/root-trunc-extract-reuse.ll
rename to llvm/test/Transforms/SLPVectorizer/root-trunc-extract-reuse.ll
index af46b4f576234b..34c068478c5f5e 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/root-trunc-extract-reuse.ll
+++ b/llvm/test/Transforms/SLPVectorizer/root-trunc-extract-reuse.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -passes=slp-vectorizer -S -slp-threshold=-100 -mtriple=x86_64 < %s | FileCheck %s
+; RUN: %if x86-registered-target %{ opt -passes=slp-vectorizer -S -slp-threshold=-100 -mtriple=x86_64 < %s | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt -passes=slp-vectorizer -S -slp-threshold=-100 -mtriple=aarch64-unknown-linux-gnu < %s | FileCheck %s %}
 
 define i1 @test() {
 ; CHECK-LABEL: @test(
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/same-scalar-in-same-phi-extract.ll b/llvm/test/Transforms/SLPVectorizer/same-scalar-in-same-phi-extract.ll
similarity index 88%
rename from llvm/test/Transforms/SLPVectorizer/X86/same-scalar-in-same-phi-extract.ll
rename to llvm/test/Transforms/SLPVectorizer/same-scalar-in-same-phi-extract.ll
index f1be11d0d0fc51..fe0813542f3093 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/same-scalar-in-same-phi-extract.ll
+++ b/llvm/test/Transforms/SLPVectorizer/same-scalar-in-same-phi-extract.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 -slp-threshold=-99999 -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
+; RUN: %if x86-registered-target %{ opt -S --passes=slp-vectorizer -slp-threshold=-99999 -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt -S --passes=slp-vectorizer -slp-threshold=-99999 -mtriple=aarch64-unknown-linux-gnu < %s | FileCheck %s %}
 
 define void @test(i32 %arg) {
 ; CHECK-LABEL: define void @test(
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/scalarazied-result.ll b/llvm/test/Transforms/SLPVectorizer/scalarazied-result.ll
similarity index 60%
rename from llvm/test/Transforms/SLPVectorizer/X86/scalarazied-result.ll
rename to llvm/test/Transforms/SLPVectorizer/scalarazied-result.ll
index 1d6e191c6f97bf..2570cdb45e1e78 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/scalarazied-result.ll
+++ b/llvm/test/Transforms/SLPVectorizer/scalarazied-result.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -passes=slp-vectorizer -mtriple=x86_64-unknown-linux-gnu -S < %s | FileCheck %s
+; RUN: %if x86-registered-target %{ opt -passes=slp-vectorizer -mtriple=x86_64-unknown-linux-gnu -S < %s | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt -passes=slp-vectorizer -mtriple=aarch64-unknown-linux-gnu -S < %s | FileCheck %s %}
 
 define void @test() {
 ; CHECK-LABEL: @test(
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/scalarization-overhead.ll b/llvm/test/Transforms/SLPVectorizer/scalarization-overhead.ll
similarity index 92%
rename from llvm/test/Transforms/SLPVectorizer/X86/scalarization-overhead.ll
rename to llvm/test/Transforms/SLPVectorizer/scalarization-overhead.ll
index 55e155840f8588..9f6b285f1ab90a 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/scalarization-overhead.ll
+++ b/llvm/test/Transforms/SLPVectorizer/scalarization-overhead.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -mtriple=x86_64-- -passes=slp-vectorizer -S < %s | FileCheck %s
+; RUN: %if x86-registered-target %{ opt -mtriple=x86_64-- -passes=slp-vectorizer -S < %s | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt -mtriple=aarch64-- -passes=slp-vectorizer -S < %s | FileCheck %s %}
 
 ; Crash Test case reported on D134605
 
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/shrink_after_reorder2.ll b/llvm/test/Transforms/SLPVectorizer/shrink_after_reorder2.ll
similarity index 91%
rename from llvm/test/Transforms/SLPVectorizer/X86/shrink_after_reorder2.ll
rename to llvm/test/Transforms/SLPVectorizer/shrink_after_reorder2.ll
index 9e3ba05f88da8d..2f0bd4a8f1315c 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/shrink_after_reorder2.ll
+++ b/llvm/test/Transforms/SLPVectorizer/shrink_after_reorder2.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -o - -passes=slp-vectorizer -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
+; RUN: %if x86-registered-target %{ opt -S -o - -passes=slp-vectorizer -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt -S -o - -passes=slp-vectorizer -mtriple=aarch64-unknown-linux-gnu < %s | FileCheck %s %}
 
 %class.e = type { i32, i32 }
 %struct.a = type { i32, i32, i32, i32 }
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/shuffle-multivector.ll b/llvm/test/Transforms/SLPVectorizer/shuffle-multivector.ll
similarity index 89%
rename from llvm/test/Transforms/SLPVectorizer/X86/shuffle-multivector.ll
rename to llvm/test/Transforms/SLPVectorizer/shuffle-multivector.ll
index c2555889f59816..2253c70dc25015 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/shuffle-multivector.ll
+++ b/llvm/test/Transforms/SLPVectorizer/shuffle-multivector.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -passes=slp-vectorizer -S < %s -mtriple=x86_64-unknown-linux -slp-threshold=-163 | FileCheck %s
+; RUN: %if x86-registered-target %{ opt -passes=slp-vectorizer -S < %s -mtriple=x86_64-unknown-linux -slp-threshold=-163 | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt -passes=slp-vectorizer -S < %s -mtriple=aarch64-unknown-linux -slp-threshold=-163 | FileCheck %s %}
 
 define void @test1(i128 %p0, i128 %p1, i128 %p2, i128 %p3, <4 x i128> %vec) {
 ; CHECK-LABEL: @test1(
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/shufflebuilder-bug.ll b/llvm/test/Transforms/SLPVectorizer/shufflebuilder-bug.ll
similarity index 89%
rename from llvm/test/Transforms/SLPVectorizer/X86/shufflebuilder-bug.ll
rename to llvm/test/Transforms/SLPVectorizer/shufflebuilder-bug.ll
index 9db7d696c7c7eb..019c9eadd7c096 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/shufflebuilder-bug.ll
+++ b/llvm/test/Transforms/SLPVectorizer/shufflebuilder-bug.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
-; RUN: opt -S -p slp-vectorizer -mtriple=x86_64-- %s | FileCheck %s
+; RUN: %if x86-registered-target %{ opt -S -p slp-vectorizer -mtriple=x86_64-- %s | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt -S -p slp-vectorizer -mtriple=aarch64-unknown-linux-gnu %s | FileCheck %s %}
 
 define void @foo(<4 x float> %vec, float %val, ptr %ptr) {
 ; CHECK-LABEL: define void @foo
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/stores-non-ordered.ll b/llvm/test/Transforms/SLPVectorizer/stores-non-ordered.ll
similarity index 92%
rename from llvm/test/Transforms/SLPVectorizer/X86/stores-non-ordered.ll
rename to llvm/test/Transforms/SLPVectorizer/stores-non-ordered.ll
index a9748ca6291ae2..aaa6be73056bd4 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/stores-non-ordered.ll
+++ b/llvm/test/Transforms/SLPVectorizer/stores-non-ordered.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 -slp-min-reg-size=64 -slp-threshold=-1000 | FileCheck %s
+; RUN: %if x86-registered-target %{ opt < %s -S -mtriple=x86_64-unknown -passes=slp-vectorizer -slp-min-reg-size=64 -slp-threshold=-1000 | FileCheck %s %}
+; RUN: %if aarch64-registered-target %{ opt < %s -S -mtriple=aarch64-unknown -passes=slp-vectorizer -slp-min-reg-size=64 -slp-threshold=-1000 | FileCheck %s %}
 
 define i32 @non-ordered-stores(ptr noalias nocapture %in, ptr noalias nocapture %inn, ptr noalias nocapture %out) {
 ; CHECK-LABEL: @non-ordered-stores(
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/unknown-entries.ll b/llvm/test/Transforms/SLPVectorizer/unknown-entries.ll
similarity index 82%
rename from llvm/test/Transforms/SLPVectorizer/X86/unknown-entries.ll
rename to llvm/test/Transforms/SLPVectorizer/unknown-entries.ll
index fc22280c2b8ada..ca9aa451a9a3ae 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/unknown-entries.ll
+++ b/llvm/test/Transforms/SLPVectorizer/unknown-entries.ll
@@ -1,7 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
-; RUN: opt < %s -passes=slp-vectorizer -S | FileCheck %s
-
-target triple = "x86_64-unknown-linux-gnu"
+; 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 <3 x i64> @ahyes(i64 %position, i64 %value) {
 ; CHECK-LABEL: define <3 x i64> @ahyes(
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/zext-incoming-for-neg-icmp.ll b/llvm/test/Transforms/SLPVectorizer/zext-incoming-for-neg-icmp.ll
similarity index 89%
rename from llvm/test/Transforms/SLPVectorizer/X86/zext-incoming-for-neg-icmp.ll
rename to llvm/test/Transforms/SLPVectorizer/zext-incoming-for-neg-icmp.ll
index 7f086d17ca4c08..89fcc7e983749b 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/zext-incoming-for-neg-icmp.ll
+++ b/llvm/test/Transforms/SLPVectorizer/zext-incoming-for-neg-icmp.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(i32 %a, i8 %b, i8 %c) {
 ; CHECK-LABEL: define i32 @test(



More information about the llvm-commits mailing list