[llvm] ddbc8f3 - [SLP] Move some of X86 tests to common directory (#106401)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 29 03:28:37 PDT 2024
Author: Elvina Yakubova
Date: 2024-08-29T11:28:33+01:00
New Revision: ddbc8f331a708dacfbf0a41e8ae6b8f6d9605407
URL: https://github.com/llvm/llvm-project/commit/ddbc8f331a708dacfbf0a41e8ae6b8f6d9605407
DIFF: https://github.com/llvm/llvm-project/commit/ddbc8f331a708dacfbf0a41e8ae6b8f6d9605407.diff
LOG: [SLP] Move some of X86 tests to common directory (#106401)
Some of the tests from X86 directory can be generalized for AArch64 to
improve its coverage.
Added:
llvm/test/Transforms/SLPVectorizer/alternate-cmp-swapped-pred-parent.ll
llvm/test/Transforms/SLPVectorizer/alternate-opcode-sindle-bv.ll
llvm/test/Transforms/SLPVectorizer/arith-div-undef.ll
llvm/test/Transforms/SLPVectorizer/bool-logical-op-reduction-with-poison.ll
llvm/test/Transforms/SLPVectorizer/buildvector-insert-mask-size.ll
llvm/test/Transforms/SLPVectorizer/buildvector-nodes-dependency.ll
llvm/test/Transforms/SLPVectorizer/call-arg-reduced-by-minbitwidth.ll
llvm/test/Transforms/SLPVectorizer/catchswitch.ll
llvm/test/Transforms/SLPVectorizer/crash_exceed_scheduling.ll
llvm/test/Transforms/SLPVectorizer/diamond_broadcast.ll
Modified:
Removed:
llvm/test/Transforms/SLPVectorizer/X86/alternate-cmp-swapped-pred-parent.ll
llvm/test/Transforms/SLPVectorizer/X86/alternate-opcode-sindle-bv.ll
llvm/test/Transforms/SLPVectorizer/X86/arith-div-undef.ll
llvm/test/Transforms/SLPVectorizer/X86/bool-logical-op-reduction-with-poison.ll
llvm/test/Transforms/SLPVectorizer/X86/buildvector-insert-mask-size.ll
llvm/test/Transforms/SLPVectorizer/X86/buildvector-nodes-dependency.ll
llvm/test/Transforms/SLPVectorizer/X86/call-arg-reduced-by-minbitwidth.ll
llvm/test/Transforms/SLPVectorizer/X86/catchswitch.ll
llvm/test/Transforms/SLPVectorizer/X86/crash_exceed_scheduling.ll
llvm/test/Transforms/SLPVectorizer/X86/diamond_broadcast.ll
################################################################################
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/alternate-cmp-swapped-pred-parent.ll b/llvm/test/Transforms/SLPVectorizer/alternate-cmp-swapped-pred-parent.ll
similarity index 94%
rename from llvm/test/Transforms/SLPVectorizer/X86/alternate-cmp-swapped-pred-parent.ll
rename to llvm/test/Transforms/SLPVectorizer/alternate-cmp-swapped-pred-parent.ll
index cfac93b1a28fb8..a709af4cf85848 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/alternate-cmp-swapped-pred-parent.ll
+++ b/llvm/test/Transforms/SLPVectorizer/alternate-cmp-swapped-pred-parent.ll
@@ -1,5 +1,7 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; REQUIRES: target={{aarch64|x86_64}}-{{.*}}
; RUN: opt < %s -mtriple=x86_64-unknown -passes=slp-vectorizer -S -slp-threshold=-1000 | FileCheck %s
+; RUN: opt < %s -mtriple=aarch64-unknown-linux-gnu -passes=slp-vectorizer -S -slp-threshold=-1000 | FileCheck %s
define void @test() {
; CHECK-LABEL: @test(
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/alternate-opcode-sindle-bv.ll b/llvm/test/Transforms/SLPVectorizer/alternate-opcode-sindle-bv.ll
similarity index 87%
rename from llvm/test/Transforms/SLPVectorizer/X86/alternate-opcode-sindle-bv.ll
rename to llvm/test/Transforms/SLPVectorizer/alternate-opcode-sindle-bv.ll
index 89268837c9d8e0..0dbdd2ec8bea6d 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/alternate-opcode-sindle-bv.ll
+++ b/llvm/test/Transforms/SLPVectorizer/alternate-opcode-sindle-bv.ll
@@ -1,5 +1,7 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
+; REQUIRES: target={{aarch64|x86_64}}-{{.*}}
; RUN: opt -S --passes=slp-vectorizer -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
+; RUN: opt -S --passes=slp-vectorizer -mtriple=aarch64-unknown-linux-gnu < %s | FileCheck %s
define <2 x i32> @test(i32 %arg) {
; CHECK-LABEL: define <2 x i32> @test(
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/arith-div-undef.ll b/llvm/test/Transforms/SLPVectorizer/arith-div-undef.ll
similarity index 88%
rename from llvm/test/Transforms/SLPVectorizer/X86/arith-div-undef.ll
rename to llvm/test/Transforms/SLPVectorizer/arith-div-undef.ll
index a7330f92346325..b96eac0d0167a3 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/arith-div-undef.ll
+++ b/llvm/test/Transforms/SLPVectorizer/arith-div-undef.ll
@@ -1,5 +1,7 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; REQUIRES: target={{aarch64|x86_64}}-{{.*}}
; RUN: opt < %s -mtriple=x86_64-unknown -passes=slp-vectorizer,instcombine -S -slp-threshold=-10000 | FileCheck %s
+; RUN: opt < %s -mtriple=aarch64-unknown-linux-gnu -passes=slp-vectorizer,instcombine -S -slp-threshold=-10000 | FileCheck %s
define <8 x i32> @sdiv_v8i32_undefs(<8 x i32> %a) {
; CHECK-LABEL: @sdiv_v8i32_undefs(
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/bool-logical-op-reduction-with-poison.ll b/llvm/test/Transforms/SLPVectorizer/bool-logical-op-reduction-with-poison.ll
similarity index 92%
rename from llvm/test/Transforms/SLPVectorizer/X86/bool-logical-op-reduction-with-poison.ll
rename to llvm/test/Transforms/SLPVectorizer/bool-logical-op-reduction-with-poison.ll
index 408ea623997289..af6df02b6b1af8 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/bool-logical-op-reduction-with-poison.ll
+++ b/llvm/test/Transforms/SLPVectorizer/bool-logical-op-reduction-with-poison.ll
@@ -1,5 +1,7 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 3
+; REQUIRES: target={{aarch64|x86_64}}-{{.*}}
; RUN: opt -S --passes=slp-vectorizer < %s -mtriple=x86_64-unknown-linux-gnu | FileCheck %s
+; RUN: opt -S --passes=slp-vectorizer < %s -mtriple=aarch64-unknown-linux-gnu | FileCheck %s
define i1 @test(i32 %0, i32 %1, i32 %p) {
; CHECK-LABEL: define i1 @test(
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/buildvector-insert-mask-size.ll b/llvm/test/Transforms/SLPVectorizer/buildvector-insert-mask-size.ll
similarity index 76%
rename from llvm/test/Transforms/SLPVectorizer/X86/buildvector-insert-mask-size.ll
rename to llvm/test/Transforms/SLPVectorizer/buildvector-insert-mask-size.ll
index b8331c9e1faa35..97367a99f36745 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/buildvector-insert-mask-size.ll
+++ b/llvm/test/Transforms/SLPVectorizer/buildvector-insert-mask-size.ll
@@ -1,5 +1,7 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-;RUN: opt -S -passes=slp-vectorizer -mtriple=x86_64-unknown-linux < %s -slp-threshold=-1 | FileCheck %s
+; REQUIRES: target={{aarch64|x86_64}}-{{.*}}
+; RUN: opt -S -passes=slp-vectorizer -mtriple=x86_64-unknown-linux < %s -slp-threshold=-1 | FileCheck %s
+; RUN: opt -S -passes=slp-vectorizer -mtriple=aarch64-unknown-linux < %s -slp-threshold=-1 | FileCheck %s
define void @test() {
; CHECK-LABEL: @test(
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/buildvector-nodes-dependency.ll b/llvm/test/Transforms/SLPVectorizer/buildvector-nodes-dependency.ll
similarity index 96%
rename from llvm/test/Transforms/SLPVectorizer/X86/buildvector-nodes-dependency.ll
rename to llvm/test/Transforms/SLPVectorizer/buildvector-nodes-dependency.ll
index 001da64c60a93f..9d3463e2e05111 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/buildvector-nodes-dependency.ll
+++ b/llvm/test/Transforms/SLPVectorizer/buildvector-nodes-dependency.ll
@@ -1,5 +1,7 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
+; REQUIRES: target={{aarch64|x86_64}}-{{.*}}
; RUN: opt -passes=slp-vectorizer -S -mtriple=x86_64 < %s | FileCheck %s
+; RUN: opt -passes=slp-vectorizer -S -mtriple=aarch64-unknown-linux-gnu < %s | FileCheck %s
define double @test() {
; CHECK-LABEL: define double @test() {
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/call-arg-reduced-by-minbitwidth.ll b/llvm/test/Transforms/SLPVectorizer/call-arg-reduced-by-minbitwidth.ll
similarity index 96%
rename from llvm/test/Transforms/SLPVectorizer/X86/call-arg-reduced-by-minbitwidth.ll
rename to llvm/test/Transforms/SLPVectorizer/call-arg-reduced-by-minbitwidth.ll
index 82966124d3baa4..b77184b1b5b87a 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/call-arg-reduced-by-minbitwidth.ll
+++ b/llvm/test/Transforms/SLPVectorizer/call-arg-reduced-by-minbitwidth.ll
@@ -1,5 +1,7 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
+; REQUIRES: target={{aarch64|x86_64}}-{{.*}}
; RUN: opt -S --passes=slp-vectorizer -mtriple=x86_64-pc-windows-msvc19.34.0 < %s | FileCheck %s
+; RUN: opt -S --passes=slp-vectorizer -mtriple=aarch64-unknown-linux-gnu < %s | FileCheck %s
define void @test(ptr %0, i8 %1, i1 %cmp12.i) {
; CHECK-LABEL: define void @test(
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/catchswitch.ll b/llvm/test/Transforms/SLPVectorizer/catchswitch.ll
similarity index 96%
rename from llvm/test/Transforms/SLPVectorizer/X86/catchswitch.ll
rename to llvm/test/Transforms/SLPVectorizer/catchswitch.ll
index f8a7a9503ca52f..a229f3de1cc4df 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/catchswitch.ll
+++ b/llvm/test/Transforms/SLPVectorizer/catchswitch.ll
@@ -1,5 +1,7 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; REQUIRES: target={{aarch64|x86_64}}-{{.*}}
; RUN: opt -passes=slp-vectorizer -S -mtriple=x86_64-pc-windows-msvc19.29.30145 < %s | FileCheck %s
+; RUN: opt -passes=slp-vectorizer -S -mtriple=aarch64-unknown-linux-gnu < %s | FileCheck %s
; This used to crash in SLP vectorization when attempting to set the
; IRBuilder's insertion point to the end of a catchswitch block, which
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/crash_exceed_scheduling.ll b/llvm/test/Transforms/SLPVectorizer/crash_exceed_scheduling.ll
similarity index 95%
rename from llvm/test/Transforms/SLPVectorizer/X86/crash_exceed_scheduling.ll
rename to llvm/test/Transforms/SLPVectorizer/crash_exceed_scheduling.ll
index 18d9f8c903c5b4..c88f78595f23f2 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/crash_exceed_scheduling.ll
+++ b/llvm/test/Transforms/SLPVectorizer/crash_exceed_scheduling.ll
@@ -1,5 +1,7 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; REQUIRES: target={{aarch64|x86_64}}-{{.*}}
; RUN: opt < %s -passes=slp-vectorizer -slp-min-tree-size=2 -slp-threshold=-1000 -slp-max-look-ahead-depth=1 -slp-schedule-budget=27 -S -mtriple=x86_64-unknown-linux-gnu | FileCheck %s
+; RUN: opt < %s -passes=slp-vectorizer -slp-min-tree-size=2 -slp-threshold=-1000 -slp-max-look-ahead-depth=1 -slp-schedule-budget=27 -S -mtriple=aarch64-unknown-linux-gnu | FileCheck %s
define void @exceed(double %0, double %1) {
; CHECK-LABEL: @exceed(
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/diamond_broadcast.ll b/llvm/test/Transforms/SLPVectorizer/diamond_broadcast.ll
similarity index 88%
rename from llvm/test/Transforms/SLPVectorizer/X86/diamond_broadcast.ll
rename to llvm/test/Transforms/SLPVectorizer/diamond_broadcast.ll
index 60006ccc825174..afe75a1f2718d8 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/diamond_broadcast.ll
+++ b/llvm/test/Transforms/SLPVectorizer/diamond_broadcast.ll
@@ -1,5 +1,7 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; REQUIRES: target={{aarch64|x86_64}}-{{.*}}
; RUN: opt < %s -passes=slp-vectorizer -S -mtriple=x86_64-unknown-linux -slp-threshold=-1 | FileCheck %s
+; RUN: opt < %s -passes=slp-vectorizer -S -mtriple=aarch64-unknown-linux-gnu -slp-threshold=-1 | FileCheck %s
define i32 @diamond_broadcast(ptr noalias nocapture %B, ptr noalias nocapture %A) {
; CHECK-LABEL: @diamond_broadcast(
More information about the llvm-commits
mailing list