Skip to content

[SLP] Move some of X86 tests to common directory #106401

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

ElvinaYakubova
Copy link
Contributor

Some of the tests from X86 directory can be generalized for AArch64 to improve its coverage.

@llvmbot
Copy link
Member

llvmbot commented Aug 28, 2024

@llvm/pr-subscribers-llvm-transforms

Author: Elvina Yakubova (ElvinaYakubova)

Changes

Some of the tests from X86 directory can be generalized for AArch64 to improve its coverage.


Full diff: https://github.com/llvm/llvm-project/pull/106401.diff

10 Files Affected:

  • (renamed) llvm/test/Transforms/SLPVectorizer/alternate-cmp-swapped-pred-parent.ll (+1)
  • (renamed) llvm/test/Transforms/SLPVectorizer/alternate-opcode-sindle-bv.ll (+1)
  • (renamed) llvm/test/Transforms/SLPVectorizer/arith-div-undef.ll (+1)
  • (renamed) llvm/test/Transforms/SLPVectorizer/bool-logical-op-reduction-with-poison.ll (+1)
  • (renamed) llvm/test/Transforms/SLPVectorizer/buildvector-insert-mask-size.ll (+2-1)
  • (renamed) llvm/test/Transforms/SLPVectorizer/buildvector-nodes-dependency.ll (+1)
  • (renamed) llvm/test/Transforms/SLPVectorizer/call-arg-reduced-by-minbitwidth.ll (+1)
  • (renamed) llvm/test/Transforms/SLPVectorizer/catchswitch.ll (+1)
  • (renamed) llvm/test/Transforms/SLPVectorizer/crash_exceed_scheduling.ll (+1)
  • (renamed) llvm/test/Transforms/SLPVectorizer/diamond_broadcast.ll (+1)
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 96%
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..3ab9f6219ece37 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,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; 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 91%
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..b03dcd1fec29ae 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,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: 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 91%
rename from llvm/test/Transforms/SLPVectorizer/X86/arith-div-undef.ll
rename to llvm/test/Transforms/SLPVectorizer/arith-div-undef.ll
index a7330f92346325..3c8f727e3897f2 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/arith-div-undef.ll
+++ b/llvm/test/Transforms/SLPVectorizer/arith-div-undef.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,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 95%
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..74559401b6b292 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,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 3
 ; 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 79%
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..00595a60a6cb26 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,6 @@
 ; 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
+; 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 97%
rename from llvm/test/Transforms/SLPVectorizer/X86/buildvector-nodes-dependency.ll
rename to llvm/test/Transforms/SLPVectorizer/buildvector-nodes-dependency.ll
index 001da64c60a93f..9f13c1248b93e3 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/buildvector-nodes-dependency.ll
+++ b/llvm/test/Transforms/SLPVectorizer/buildvector-nodes-dependency.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
 ; 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 97%
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..ac12d8c166ed91 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,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-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 97%
rename from llvm/test/Transforms/SLPVectorizer/X86/catchswitch.ll
rename to llvm/test/Transforms/SLPVectorizer/catchswitch.ll
index f8a7a9503ca52f..41c4d7210899b5 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/catchswitch.ll
+++ b/llvm/test/Transforms/SLPVectorizer/catchswitch.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-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 96%
rename from llvm/test/Transforms/SLPVectorizer/X86/crash_exceed_scheduling.ll
rename to llvm/test/Transforms/SLPVectorizer/crash_exceed_scheduling.ll
index 18d9f8c903c5b4..96e035dd42f217 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/crash_exceed_scheduling.ll
+++ b/llvm/test/Transforms/SLPVectorizer/crash_exceed_scheduling.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; 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 91%
rename from llvm/test/Transforms/SLPVectorizer/X86/diamond_broadcast.ll
rename to llvm/test/Transforms/SLPVectorizer/diamond_broadcast.ll
index 60006ccc825174..8dea9ddbc03718 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/diamond_broadcast.ll
+++ b/llvm/test/Transforms/SLPVectorizer/diamond_broadcast.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 -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(

Copy link
Member

@alexey-bataev alexey-bataev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These test must be either copied to AArch64 directory, or special directives REQUIRES: x86, aarch64 should be used to avoid false failed tests in some llvm configs

@sushgokh
Copy link
Contributor

sushgokh commented Aug 29, 2024

@alexey-bataev

REQUIRES: x86, aarch64

Does not this mean that the supported host architecture must be x86/aarch64 ? We just want to run the tests for x86/aarch64 which is indicated by the -mtriple option and hence, it wont run for other triples.

@alexey-bataev
Copy link
Member

If the llvm compiled without x86 or aarch64, it still tries to run all the tests. These tests will fail, because llvm won't be able execute them successfully. To prevent their unconditional execution, need to add special directives that checks if the compiler supports given target. Or put them in the corresponding directories, where config files do the same - check if the llvm support given target before running the tests in the given directories.

@ElvinaYakubova
Copy link
Contributor Author

If the llvm compiled without x86 or aarch64, it still tries to run all the tests. These tests will fail, because llvm won't be able execute them successfully. To prevent their unconditional execution, need to add special directives that checks if the compiler supports given target. Or put them in the corresponding directories, where config files do the same - check if the llvm support given target before running the tests in the given directories.

Thanks for the explanation. I updated the commit with REQUIRES since we don't want to duplicate tests

Copy link
Member

@alexey-bataev alexey-bataev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG

Some of the tests from X86 directory can be generalized for AArch64
to improve its coverage.
@ElvinaYakubova ElvinaYakubova merged commit ddbc8f3 into llvm:main Aug 29, 2024
5 of 6 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 29, 2024

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-sie-ubuntu-fast running on sie-linux-worker while building llvm at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/144/builds/5728

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: Transforms/SLPVectorizer/diamond_broadcast.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 3: /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/opt < /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/test/Transforms/SLPVectorizer/diamond_broadcast.ll -passes=slp-vectorizer -S -mtriple=x86_64-unknown-linux -slp-threshold=-1 | /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/FileCheck /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/test/Transforms/SLPVectorizer/diamond_broadcast.ll
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/opt -passes=slp-vectorizer -S -mtriple=x86_64-unknown-linux -slp-threshold=-1
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/FileCheck /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/test/Transforms/SLPVectorizer/diamond_broadcast.ll
RUN: at line 4: /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/opt < /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/test/Transforms/SLPVectorizer/diamond_broadcast.ll -passes=slp-vectorizer -S -mtriple=aarch64-unknown-linux-gnu -slp-threshold=-1 | /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/FileCheck /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/test/Transforms/SLPVectorizer/diamond_broadcast.ll
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/FileCheck /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/test/Transforms/SLPVectorizer/diamond_broadcast.ll
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/opt -passes=slp-vectorizer -S -mtriple=aarch64-unknown-linux-gnu -slp-threshold=-1
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/opt: warning: failed to infer data layout: unable to get target for 'aarch64-unknown-linux-gnu', see --version and --triple.
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/opt: WARNING: failed to create target machine for 'aarch64-unknown-linux-gnu': unable to get target for 'aarch64-unknown-linux-gnu', see --version and --triple.
�[1m/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/test/Transforms/SLPVectorizer/diamond_broadcast.ll:10:15: �[0m�[0;1;31merror: �[0m�[1mCHECK-NEXT: expected string not found in input
�[0m; CHECK-NEXT: [[TMP0:%.*]] = insertelement <4 x i32> poison, i32 [[LD]], i32 0
�[0;1;32m              ^
�[0m�[1m<stdin>:7:33: �[0m�[0;1;30mnote: �[0m�[1mscanning from here
�[0m %ld = load i32, ptr %A, align 4
�[0;1;32m                                ^
�[0m�[1m<stdin>:7:33: �[0m�[0;1;30mnote: �[0m�[1mwith "LD" equal to "%ld"
�[0m %ld = load i32, ptr %A, align 4
�[0;1;32m                                ^
�[0m�[1m<stdin>:11:7: �[0m�[0;1;30mnote: �[0m�[1mpossible intended match here
�[0m %arrayidx9 = getelementptr inbounds i32, ptr %B, i64 1
�[0;1;32m      ^
�[0m
Input file: <stdin>
Check file: /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/test/Transforms/SLPVectorizer/diamond_broadcast.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
�[1m�[0m�[0;1;30m           1: �[0m�[1m�[0;1;46m; ModuleID = '<stdin>' �[0m
�[0;1;30m           2: �[0m�[1m�[0;1;46msource_filename = "<stdin>" �[0m
�[0;1;30m           3: �[0m�[1m�[0;1;46mtarget triple = "aarch64-unknown-linux-gnu" �[0m
�[0;1;30m           4: �[0m�[1m�[0;1;46m �[0m
�[0;1;30m           5: �[0m�[1m�[0;1;46mdefine i32 �[0m@diamond_broadcast(�[0;1;46mptr noalias nocapture %B, ptr noalias nocapture %A) { �[0m
�[0;1;32mlabel:7'0                ^~~~~~~~~~~~~~~~~~~
�[0m�[0;1;32mlabel:7'1                ^~~~~~~~~~~~~~~~~~~
�[0m�[0;1;30m           6: �[0m�[1m�[0;1;46m�[0mentry:�[0;1;46m �[0m
�[0;1;32mnext:8        ^~~~~~
�[0m�[0;1;30m           7: �[0m�[1m�[0;1;46m �[0m%ld = load i32, ptr %A, align 4�[0;1;46m �[0m
�[0;1;32mnext:9'0       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
�[0m�[0;1;32mnext:9'1       ^~~                              captured var "LD"
�[0m�[0;1;32mnext:9'2                           ^~           captured var "A"
�[0m�[0;1;31mnext:10'0                                     X error: no match found
�[0m�[0;1;31mnext:10'1                                       with "LD" equal to "%ld"
�[0m�[0;1;30m           8: �[0m�[1m�[0;1;46m %mul = mul i32 %ld, %ld �[0m
�[0;1;31mnext:10'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 29, 2024

LLVM Buildbot has detected a new failure on builder openmp-offload-sles-build-only running on rocm-worker-hw-04-sles while building llvm at step 8 "Add check check-llvm".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/140/builds/5347

Here is the relevant piece of the build log for the reference
Step 8 (Add check check-llvm) failure: test (failure)
******************** TEST 'LLVM :: Transforms/SLPVectorizer/alternate-cmp-swapped-pred-parent.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 3: /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/opt < /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/Transforms/SLPVectorizer/alternate-cmp-swapped-pred-parent.ll -mtriple=x86_64-unknown -passes=slp-vectorizer -S -slp-threshold=-1000 | /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/FileCheck /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/Transforms/SLPVectorizer/alternate-cmp-swapped-pred-parent.ll
+ /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/opt -mtriple=x86_64-unknown -passes=slp-vectorizer -S -slp-threshold=-1000
+ /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/FileCheck /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/Transforms/SLPVectorizer/alternate-cmp-swapped-pred-parent.ll
RUN: at line 4: /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/opt < /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/Transforms/SLPVectorizer/alternate-cmp-swapped-pred-parent.ll -mtriple=aarch64-unknown-linux-gnu -passes=slp-vectorizer -S -slp-threshold=-1000 | /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/FileCheck /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/Transforms/SLPVectorizer/alternate-cmp-swapped-pred-parent.ll
+ /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/opt -mtriple=aarch64-unknown-linux-gnu -passes=slp-vectorizer -S -slp-threshold=-1000
+ /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/FileCheck /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/Transforms/SLPVectorizer/alternate-cmp-swapped-pred-parent.ll
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/opt: warning: failed to infer data layout: unable to get target for 'aarch64-unknown-linux-gnu', see --version and --triple.
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/opt: WARNING: failed to create target machine for 'aarch64-unknown-linux-gnu': unable to get target for 'aarch64-unknown-linux-gnu', see --version and --triple.
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/Transforms/SLPVectorizer/alternate-cmp-swapped-pred-parent.ll:13:15: error: CHECK-NEXT: expected string not found in input
; CHECK-NEXT: [[TMP0:%.*]] = insertelement <8 x i16> <i16 0, i16 0, i16 0, i16 poison, i16 poison, i16 poison, i16 0, i16 poison>, i16 [[CALL37]], i32 3
              ^
<stdin>:11:39: note: scanning from here
 %call = load i16, ptr poison, align 2
                                      ^
<stdin>:11:39: note: with "CALL37" equal to "%call37"
 %call = load i16, ptr poison, align 2
                                      ^
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/Transforms/SLPVectorizer/alternate-cmp-swapped-pred-parent.ll:44:15: error: CHECK-NEXT: expected string not found in input
; CHECK-NEXT: [[TMP0:%.*]] = insertelement <8 x i16> <i16 0, i16 0, i16 0, i16 poison, i16 poison, i16 poison, i16 poison, i16 0>, i16 [[CALL]], i32 3
              ^
<stdin>:31:41: note: scanning from here
 %call37 = load i16, ptr poison, align 2
                                        ^
<stdin>:31:41: note: with "CALL" equal to "%call"
 %call37 = load i16, ptr poison, align 2
                                        ^

Input file: <stdin>
Check file: /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/Transforms/SLPVectorizer/alternate-cmp-swapped-pred-parent.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
           6: entry: 
           7:  %call37 = load i16, ptr poison, align 2 
           8:  br label %bb 
           9:  
          10: bb: ; preds = %entry 
          11:  %call = load i16, ptr poison, align 2 
next:13'0                                           X error: no match found
next:13'1                                             with "CALL37" equal to "%call37"
...

@@ -1,5 +1,7 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; REQUIRES: target={{aarch64|x86_64}}-{{.*}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you check this works as expected?

With this patch merged, those tests are now considered 'unsupported' even when all targets are enabled.

You can check this by applying the patch below and observe that there are no test failures

diff --git a/llvm/test/Transforms/SLPVectorizer/alternate-cmp-swapped-pred-parent.ll b/llvm/test/Transforms/SLPVectorizer/alternate-cmp-swapped-pred-parent.ll
index a709af4cf858..1511dfbe37b6 100644
--- a/llvm/test/Transforms/SLPVectorizer/alternate-cmp-swapped-pred-parent.ll
+++ b/llvm/test/Transforms/SLPVectorizer/alternate-cmp-swapped-pred-parent.ll
@@ -6,7 +6,6 @@
 define void @test() {
 ; CHECK-LABEL: @test(
 ; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[CALL37:%.*]] = load i16, ptr poison, align 2
 ; CHECK-NEXT:    br label [[BB:%.*]]
 ; CHECK:       bb:
 ; CHECK-NEXT:    [[CALL:%.*]] = load i16, ptr poison, align 2

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I checked and locally for me it worked fine
There are some buildbots failures as well, I'll try to figure out what's going on asap

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it helps, the above is for ARM64 macOS

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fhahn it should be fixed now #106531

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 29, 2024

LLVM Buildbot has detected a new failure on builder arc-builder running on arc-worker while building llvm at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/3/builds/3717

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: Transforms/SLPVectorizer/diamond_broadcast.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 3: /buildbot/worker/arc-folder/build/bin/opt < /buildbot/worker/arc-folder/llvm-project/llvm/test/Transforms/SLPVectorizer/diamond_broadcast.ll -passes=slp-vectorizer -S -mtriple=x86_64-unknown-linux -slp-threshold=-1 | /buildbot/worker/arc-folder/build/bin/FileCheck /buildbot/worker/arc-folder/llvm-project/llvm/test/Transforms/SLPVectorizer/diamond_broadcast.ll
+ /buildbot/worker/arc-folder/build/bin/opt -passes=slp-vectorizer -S -mtriple=x86_64-unknown-linux -slp-threshold=-1
+ /buildbot/worker/arc-folder/build/bin/FileCheck /buildbot/worker/arc-folder/llvm-project/llvm/test/Transforms/SLPVectorizer/diamond_broadcast.ll
RUN: at line 4: /buildbot/worker/arc-folder/build/bin/opt < /buildbot/worker/arc-folder/llvm-project/llvm/test/Transforms/SLPVectorizer/diamond_broadcast.ll -passes=slp-vectorizer -S -mtriple=aarch64-unknown-linux-gnu -slp-threshold=-1 | /buildbot/worker/arc-folder/build/bin/FileCheck /buildbot/worker/arc-folder/llvm-project/llvm/test/Transforms/SLPVectorizer/diamond_broadcast.ll
+ /buildbot/worker/arc-folder/build/bin/FileCheck /buildbot/worker/arc-folder/llvm-project/llvm/test/Transforms/SLPVectorizer/diamond_broadcast.ll
+ /buildbot/worker/arc-folder/build/bin/opt -passes=slp-vectorizer -S -mtriple=aarch64-unknown-linux-gnu -slp-threshold=-1
/buildbot/worker/arc-folder/build/bin/opt: warning: failed to infer data layout: unable to get target for 'aarch64-unknown-linux-gnu', see --version and --triple.
/buildbot/worker/arc-folder/build/bin/opt: WARNING: failed to create target machine for 'aarch64-unknown-linux-gnu': unable to get target for 'aarch64-unknown-linux-gnu', see --version and --triple.
/buildbot/worker/arc-folder/llvm-project/llvm/test/Transforms/SLPVectorizer/diamond_broadcast.ll:10:15: error: CHECK-NEXT: expected string not found in input
; CHECK-NEXT: [[TMP0:%.*]] = insertelement <4 x i32> poison, i32 [[LD]], i32 0
              ^
<stdin>:7:33: note: scanning from here
 %ld = load i32, ptr %A, align 4
                                ^
<stdin>:7:33: note: with "LD" equal to "%ld"
 %ld = load i32, ptr %A, align 4
                                ^
<stdin>:11:7: note: possible intended match here
 %arrayidx9 = getelementptr inbounds i32, ptr %B, i64 1
      ^

Input file: <stdin>
Check file: /buildbot/worker/arc-folder/llvm-project/llvm/test/Transforms/SLPVectorizer/diamond_broadcast.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           1: ; ModuleID = '<stdin>' 
           2: source_filename = "<stdin>" 
           3: target triple = "aarch64-unknown-linux-gnu" 
           4:  
           5: define i32 @diamond_broadcast(ptr noalias nocapture %B, ptr noalias nocapture %A) { 
           6: entry: 
           7:  %ld = load i32, ptr %A, align 4 
next:10'0                                     X error: no match found
next:10'1                                       with "LD" equal to "%ld"
           8:  %mul = mul i32 %ld, %ld 
next:10'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
           9:  store i32 %mul, ptr %B, align 4 
next:10'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          10:  %mul8 = mul i32 %ld, %ld 
next:10'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
          11:  %arrayidx9 = getelementptr inbounds i32, ptr %B, i64 1 
next:10'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants