[polly] 4d8b99a - [Polly] Fix REQUIRES for nvptx-dependent tests

Paul Robinson via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 13 11:28:04 PST 2023


Author: Paul Robinson
Date: 2023-01-13T11:27:54-08:00
New Revision: 4d8b99af7391f46afb0f82117515bc682d319371

URL: https://github.com/llvm/llvm-project/commit/4d8b99af7391f46afb0f82117515bc682d319371
DIFF: https://github.com/llvm/llvm-project/commit/4d8b99af7391f46afb0f82117515bc682d319371.diff

LOG: [Polly] Fix REQUIRES for nvptx-dependent tests

These have been effectively disabled ever since 'nvptx' was added to
the REQUIRES clauses, because REQUIRES does not support triple checks.
The new 'target=<triple>' is supported, so switch to that scheme.
Fix up XFAIL annotations, now that these tests are actually run.

Part of the project to eliminate special handling for triples in lit
expressions.

Differential Revision: https://reviews.llvm.org/D139728

Added: 
    

Modified: 
    polly/test/GPGPU/double-parallel-loop.ll
    polly/test/GPGPU/scalar-param-and-value-32-bit.ll
    polly/test/GPGPU/scalar-param-and-value-use.ll
    polly/test/GPGPU/scalar-parameter-fp128.ll
    polly/test/GPGPU/scalar-parameter-half.ll
    polly/test/GPGPU/scalar-parameter-i120.ll
    polly/test/GPGPU/scalar-parameter-i128.ll
    polly/test/GPGPU/scalar-parameter-i3000.ll
    polly/test/GPGPU/scalar-parameter-i80.ll
    polly/test/GPGPU/scalar-parameter-ppc_fp128.ll
    polly/test/GPGPU/scalar-parameter-x86_fp80.ll
    polly/test/GPGPU/scalar-parameter.ll

Removed: 
    


################################################################################
diff  --git a/polly/test/GPGPU/double-parallel-loop.ll b/polly/test/GPGPU/double-parallel-loop.ll
index 9d2f13b63d16d..911a6a6a9ca5d 100644
--- a/polly/test/GPGPU/double-parallel-loop.ll
+++ b/polly/test/GPGPU/double-parallel-loop.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-print-scops -disable-outout < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-print-scops -disable-output < %s | FileCheck %s
 ; RUN: opt %loadPolly -polly-codegen-ppcg -polly-acc-dump-schedule \
 ; RUN: -disable-output < %s | \
 ; RUN: FileCheck -check-prefix=SCHED %s
@@ -18,7 +18,11 @@
 ; RUN: -disable-output < %s | \
 ; RUN: FileCheck %s -check-prefix=KERNEL-ASM
 
-; REQUIRES: pollyacc,nvptx
+; XFAIL: *
+
+; REQUIRES: pollyacc, target=nvptx{{.*}}
+
+; This fails today due to extensive output 
diff erences from when the test was written.
 
 ; CHECK: Stmt_bb5
 ; CHECK-NEXT:       Domain :=

diff  --git a/polly/test/GPGPU/scalar-param-and-value-32-bit.ll b/polly/test/GPGPU/scalar-param-and-value-32-bit.ll
index 7aabde083d9b1..504f5e0b90cad 100644
--- a/polly/test/GPGPU/scalar-param-and-value-32-bit.ll
+++ b/polly/test/GPGPU/scalar-param-and-value-32-bit.ll
@@ -2,7 +2,7 @@
 ; RUN: -disable-output < %s | \
 ; RUN: FileCheck %s
 
-; REQUIRES: pollyacc,nvptx
+; REQUIRES: pollyacc, target=nvptx{{.*}}
 ;
 ;    void foo(float A[], int n) {
 ;      for (long j = 0; j < n; j++)
@@ -11,7 +11,7 @@
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 
-; CHECK: define ptx_kernel void @kernel_0(i8* %MemRef_A, i32 %n)
+; CHECK: define ptx_kernel void @FUNC_foo_SCOP_0_KERNEL_0(i8 addrspace(1)* %MemRef_A, i32 %n)
 
 define void @foo(float* %A, i32 %n) {
 bb:

diff  --git a/polly/test/GPGPU/scalar-param-and-value-use.ll b/polly/test/GPGPU/scalar-param-and-value-use.ll
index 6853fcf04d93f..1884232442212 100644
--- a/polly/test/GPGPU/scalar-param-and-value-use.ll
+++ b/polly/test/GPGPU/scalar-param-and-value-use.ll
@@ -2,7 +2,7 @@
 ; RUN: -disable-output < %s | \
 ; RUN: FileCheck -check-prefix=IR %s
 
-; REQUIRES: pollyacc,nvptx
+; REQUIRES: pollyacc, target=nvptx{{.*}}
 
 ;    void foo(long n, float A[][n]) {
 ;      for (long i = 0; i < 32; i++)
@@ -17,7 +17,7 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 ; it was referenced from a SCEV  or instruction that not part of any loop
 ; bound.
 
-; IR: %polly.access.mul.MemRef_A6 = mul nsw i64 {{.*}}, %n
+; IR: %polly.access.mul.MemRef_A = mul nsw i64 {{.*}}, %n
 
 define void @foo(i64 %n, float* %A) {
 bb:

diff  --git a/polly/test/GPGPU/scalar-parameter-fp128.ll b/polly/test/GPGPU/scalar-parameter-fp128.ll
index d43de165dcd1f..f52c322370077 100644
--- a/polly/test/GPGPU/scalar-parameter-fp128.ll
+++ b/polly/test/GPGPU/scalar-parameter-fp128.ll
@@ -2,9 +2,9 @@
 
 ; XFAIL: *
 
-; REQUIRES: pollyacc,nvptx
+; REQUIRES: pollyacc, target=nvptx{{.*}}
 
-; This fails today with "type mismatch between callee prototype and arguments"
+; This fails today with "LowerFormalArguments didn't emit the correct number of values!"
 
 ;    void foo(fp128 A[], fp128 b) {
 ;      for (long i = 0; i < 1024; i++)

diff  --git a/polly/test/GPGPU/scalar-parameter-half.ll b/polly/test/GPGPU/scalar-parameter-half.ll
index d55ae1adfb975..6ed9876e21cce 100644
--- a/polly/test/GPGPU/scalar-parameter-half.ll
+++ b/polly/test/GPGPU/scalar-parameter-half.ll
@@ -1,8 +1,6 @@
 ; RUN: opt %loadPolly -polly-codegen-ppcg -polly-acc-dump-code -disable-output %s
 
-; REQUIRES: pollyacc,nvptx
-
-; This fails today with "unexpected type" in the LLVM PTX backend.
+; REQUIRES: pollyacc, target=nvptx{{.*}}
 
 ;    void foo(half A[], half b) {
 ;      for (long i = 0; i < 1024; i++)

diff  --git a/polly/test/GPGPU/scalar-parameter-i120.ll b/polly/test/GPGPU/scalar-parameter-i120.ll
index 087857a595c97..5599c711919c5 100644
--- a/polly/test/GPGPU/scalar-parameter-i120.ll
+++ b/polly/test/GPGPU/scalar-parameter-i120.ll
@@ -2,9 +2,9 @@
 
 ; XFAIL: *
 
-; REQUIRES: pollyacc,nvptx
+; REQUIRES: pollyacc, target=nvptx{{.*}}
 
-; This fails today with "type mismatch between callee prototype and arguments"
+; This fails today with "Promotion is not suitable for scalars of size larger than 64-bits"
 
 ;    void foo(i120 A[], i120 b) {
 ;      for (long i = 0; i < 1024; i++)

diff  --git a/polly/test/GPGPU/scalar-parameter-i128.ll b/polly/test/GPGPU/scalar-parameter-i128.ll
index 55c1273b453c5..73951e8dbc28e 100644
--- a/polly/test/GPGPU/scalar-parameter-i128.ll
+++ b/polly/test/GPGPU/scalar-parameter-i128.ll
@@ -1,11 +1,6 @@
 ; RUN: opt %loadPolly -polly-codegen-ppcg -polly-acc-dump-code -disable-output %s
 
-; XFAIL: *
-
-; REQUIRES: pollyacc,nvptx
-
-; This fails today with "LowerFormalArguments didn't emit the correct number of
-;                        values!"
+; REQUIRES: pollyacc, target=nvptx{{.*}}
 
 ;    void foo(i128 A[], i128 b) {
 ;      for (long i = 0; i < 1024; i++)

diff  --git a/polly/test/GPGPU/scalar-parameter-i3000.ll b/polly/test/GPGPU/scalar-parameter-i3000.ll
index 4203c2f8b0c3a..58e0c611d5f27 100644
--- a/polly/test/GPGPU/scalar-parameter-i3000.ll
+++ b/polly/test/GPGPU/scalar-parameter-i3000.ll
@@ -2,10 +2,9 @@
 
 ; XFAIL: *
 
-; REQUIRES: pollyacc,nvptx
+; REQUIRES: pollyacc, target=nvptx{{.*}}
 
-; This fails today with "LowerFormalArguments didn't emit the correct number of
-;                        values!"
+; This fails today with "Promotion is not suitable for scalars of size larger than 64-bits"
 
 ;    void foo(i3000 A[], i3000 b) {
 ;      for (long i = 0; i < 1024; i++)

diff  --git a/polly/test/GPGPU/scalar-parameter-i80.ll b/polly/test/GPGPU/scalar-parameter-i80.ll
index b2f8f2c01e6c9..5f52072f3d27b 100644
--- a/polly/test/GPGPU/scalar-parameter-i80.ll
+++ b/polly/test/GPGPU/scalar-parameter-i80.ll
@@ -2,10 +2,9 @@
 
 ; XFAIL: *
 
-; REQUIRES: pollyacc,nvptx
+; REQUIRES: pollyacc, target=nvptx{{.*}}
 
-; This fails today with "LowerFormalArguments didn't emit the correct number of
-;                        values!"
+; This fails today with "Promotion is not suitable for scalars of size larger than 64-bits"
 
 ;    void foo(i80 A[], i80 b) {
 ;      for (long i = 0; i < 1024; i++)

diff  --git a/polly/test/GPGPU/scalar-parameter-ppc_fp128.ll b/polly/test/GPGPU/scalar-parameter-ppc_fp128.ll
index 6290b18306980..7b402a6851769 100644
--- a/polly/test/GPGPU/scalar-parameter-ppc_fp128.ll
+++ b/polly/test/GPGPU/scalar-parameter-ppc_fp128.ll
@@ -2,9 +2,9 @@
 
 ; XFAIL: *
 
-; REQUIRES: pollyacc,nvptx
+; REQUIRES: pollyacc, target=nvptx{{.*}}
 
-; This fails today with "type mismatch between callee prototype and arguments"
+; This fails today with "LowerFormalArguments didn't emit the correct number of values!"
 
 ;    void foo(fp128 A[], fp128 b) {
 ;      for (long i = 0; i < 1024; i++)

diff  --git a/polly/test/GPGPU/scalar-parameter-x86_fp80.ll b/polly/test/GPGPU/scalar-parameter-x86_fp80.ll
index d43de165dcd1f..f52c322370077 100644
--- a/polly/test/GPGPU/scalar-parameter-x86_fp80.ll
+++ b/polly/test/GPGPU/scalar-parameter-x86_fp80.ll
@@ -2,9 +2,9 @@
 
 ; XFAIL: *
 
-; REQUIRES: pollyacc,nvptx
+; REQUIRES: pollyacc, target=nvptx{{.*}}
 
-; This fails today with "type mismatch between callee prototype and arguments"
+; This fails today with "LowerFormalArguments didn't emit the correct number of values!"
 
 ;    void foo(fp128 A[], fp128 b) {
 ;      for (long i = 0; i < 1024; i++)

diff  --git a/polly/test/GPGPU/scalar-parameter.ll b/polly/test/GPGPU/scalar-parameter.ll
index 73a51e889e33e..2013f00b44a6e 100644
--- a/polly/test/GPGPU/scalar-parameter.ll
+++ b/polly/test/GPGPU/scalar-parameter.ll
@@ -10,7 +10,11 @@
 ; RUN: -disable-output -polly-acc-dump-kernel-ir < %s | \
 ; RUN: FileCheck -check-prefix=KERNEL %s
 
-; REQUIRES: pollyacc,nvptx
+; XFAIL: *
+
+; REQUIRES: pollyacc, target=nvptx{{.*}}
+
+; This fails today due to extensive output 
diff erences from when the test was written.
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 
@@ -39,8 +43,6 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 ;        A[i] += b;
 ;    }
 ;
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-
 define void @float(float* %A, float %b) {
 bb:
   br label %bb1
@@ -93,8 +95,6 @@ bb7:                                              ; preds = %bb1
 ;        A[i] += b;
 ;    }
 ;
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-
 define void @double(double* %A, double %b) {
 bb:
   br label %bb1
@@ -142,8 +142,6 @@ bb7:                                              ; preds = %bb1
 ;        A[i] += b;
 ;    }
 ;
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-
 define void @i1(i1* %A, i1 %b) {
 bb:
   br label %bb1
@@ -191,8 +189,6 @@ bb7:                                              ; preds = %bb1
 ;        A[i] += b;
 ;    }
 ;
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-
 define void @i3(i3* %A, i3 %b) {
 bb:
   br label %bb1
@@ -240,8 +236,6 @@ bb7:                                              ; preds = %bb1
 ;        A[i] += b;
 ;    }
 ;
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-
 define void @i8(i8* %A, i8 %b) {
 bb:
   br label %bb1
@@ -300,8 +294,6 @@ bb7:                                              ; preds = %bb1
 ;        A[i] += b;
 ;    }
 ;
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-
 define void @i32(i32* %A, i32 %b) {
 bb:
   br label %bb1
@@ -349,8 +341,6 @@ bb7:                                              ; preds = %bb1
 ;        A[i] += b;
 ;    }
 ;
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-
 define void @i60(i60* %A, i60 %b) {
 bb:
   br label %bb1
@@ -398,8 +388,6 @@ bb7:                                              ; preds = %bb1
 ;        A[i] += b;
 ;    }
 ;
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-
 define void @i64(i64* %A, i64 %b) {
 bb:
   br label %bb1


        


More information about the llvm-commits mailing list