forked from OSchip/llvm-project
Expand test cases affected by next commit
As these test cases will be changed in a subsequent commit, we expand and tighten them to make the subsequent changes to them more obvious. As part of this we add more context to some test cases and add CHECK-NEXT lines to ensure no intermediate lines are missed by accident. llvm-svn: 272499
This commit is contained in:
parent
537b146798
commit
8620679eb5
|
@ -1,13 +1,20 @@
|
|||
; RUN: opt %loadPolly -polly-import-jscop-dir=%S -polly-import-jscop -polly-ast -polly-ast-detect-parallel -analyze < %s | FileCheck %s
|
||||
;
|
||||
; CHECK-NOT: #pragma simd{{\s*$}}
|
||||
; CHECK: #pragma simd reduction
|
||||
; CHECK: Stmt_S0(2 * n - c1)
|
||||
; CHECK: #pragma simd{{\s*$}}
|
||||
; CHECK: Stmt_S1
|
||||
; CHECK: #pragma simd reduction
|
||||
; CHECK: Stmt_S0(2 * n - c1)
|
||||
; CHECK-NOT: #pragma simd{{\s*$}}
|
||||
; CHECK: #pragma known-parallel reduction (+ : A)
|
||||
; CHECK-NEXT: for (int c0 = 0; c0 <= 2; c0 += 1) {
|
||||
; CHECK-NEXT: if (c0 == 2) {
|
||||
; CHECK-NEXT: #pragma simd reduction (+ : A)
|
||||
; CHECK-NEXT: for (int c1 = 1; c1 <= 2 * n; c1 += 2)
|
||||
; CHECK-NEXT: Stmt_S0(2 * n - c1);
|
||||
; CHECK-NEXT: } else if (c0 == 1) {
|
||||
; CHECK-NEXT: #pragma simd
|
||||
; CHECK-NEXT: for (int c1 = 0; c1 < 2 * n; c1 += 1)
|
||||
; CHECK-NEXT: Stmt_S1(c1);
|
||||
; CHECK-NEXT: } else
|
||||
; CHECK-NEXT: #pragma simd reduction (+ : A)
|
||||
; CHECK-NEXT: for (int c1 = 2; c1 <= 2 * n; c1 += 2)
|
||||
; CHECK-NEXT: Stmt_S0(2 * n - c1);
|
||||
; CHECK-NEXT: }
|
||||
;
|
||||
; void rmalrs(int *A, long n) {
|
||||
; for (long i = 0; i < 2 * n; i++)
|
||||
|
|
|
@ -1,13 +1,20 @@
|
|||
; RUN: opt %loadPolly -polly-import-jscop-dir=%S -polly-import-jscop -polly-ast -polly-ast-detect-parallel -analyze < %s | FileCheck %s
|
||||
;
|
||||
; CHECK-NOT: #pragma simd{{\s*$}}
|
||||
; CHECK: #pragma simd reduction
|
||||
; CHECK: Stmt_S0
|
||||
; CHECK: #pragma simd{{\s*$}}
|
||||
; CHECK: Stmt_S1
|
||||
; CHECK: #pragma simd reduction
|
||||
; CHECK: Stmt_S0
|
||||
; CHECK-NOT: #pragma simd{{\s*$}}
|
||||
; CHECK: #pragma known-parallel reduction (+ : A)
|
||||
; CHECK-NEXT: for (int c0 = 0; c0 <= 2; c0 += 1) {
|
||||
; CHECK-NEXT: if (c0 == 2) {
|
||||
; CHECK-NEXT: #pragma simd reduction (+ : A)
|
||||
; CHECK-NEXT: for (int c1 = 1; c1 < 2 * n; c1 += 2)
|
||||
; CHECK-NEXT: Stmt_S0(c1);
|
||||
; CHECK-NEXT: } else if (c0 == 1) {
|
||||
; CHECK-NEXT: #pragma simd
|
||||
; CHECK-NEXT: for (int c1 = 0; c1 < 2 * n; c1 += 1)
|
||||
; CHECK-NEXT: Stmt_S1(c1);
|
||||
; CHECK-NEXT: } else
|
||||
; CHECK-NEXT: #pragma simd reduction (+ : A)
|
||||
; CHECK-NEXT: for (int c1 = 0; c1 < 2 * n; c1 += 2)
|
||||
; CHECK-NEXT: Stmt_S0(c1);
|
||||
; CHECK-NEXT: }
|
||||
;
|
||||
; void rms(int *A, long n) {
|
||||
; for (long i = 0; i < 2 * n; i++)
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
; CHECK-NEXT: %polly.access.C.load = load i32, i32* %polly.access.C
|
||||
; CHECK-NOT: %polly.access.C.load = load i32, i32* %polly.access.C
|
||||
;
|
||||
; CHECK: polly.cond
|
||||
; CHECK: %[[R0:[0-9]*]] = sext i32 %polly.access.C.load to i64
|
||||
; CHECK: %[[R1:[0-9]*]] = icmp sle i64 %[[R0]], -1
|
||||
; CHECK-LABEL: polly.cond:
|
||||
; CHECK-NEXT: %[[R0:[0-9]*]] = sext i32 %polly.access.C.load to i64
|
||||
; CHECK-NEXT: %[[R1:[0-9]*]] = icmp sle i64 %[[R0]], -1
|
||||
;
|
||||
; CHECK: polly.cond
|
||||
; CHECK: %[[R2:[0-9]*]] = sext i32 %polly.access.C.load to i64
|
||||
; CHECK: %[[R3:[0-9]*]] = icmp sge i64 %[[R2]], 1
|
||||
; CHECK-LABEL: polly.cond4:
|
||||
; CHECK-NEXT: %[[R2:[0-9]*]] = sext i32 %polly.access.C.load to i64
|
||||
; CHECK-NEXT: %[[R3:[0-9]*]] = icmp sge i64 %[[R2]], 1
|
||||
;
|
||||
; CHECK-NOT: polly.stmt.bb2
|
||||
;
|
||||
|
|
|
@ -33,18 +33,19 @@ return:
|
|||
ret void
|
||||
}
|
||||
|
||||
; CHECK: if (P <= -1) {
|
||||
; CHECK: for (int c0 = 0; c0 < N; c0 += 1)
|
||||
; CHECK: Stmt_store(c0);
|
||||
; CHECK: } else if (P >= 1)
|
||||
; CHECK: for (int c0 = 0; c0 < N; c0 += 1)
|
||||
; CHECK: Stmt_store(c0);
|
||||
; CHECK: }
|
||||
; CHECK: if (P <= -1) {
|
||||
; CHECK-NEXT: for (int c0 = 0; c0 < N; c0 += 1)
|
||||
; CHECK-NEXT: Stmt_store(c0);
|
||||
; CHECK-NEXT: } else if (P >= 1)
|
||||
; CHECK-NEXT: for (int c0 = 0; c0 < N; c0 += 1)
|
||||
; CHECK-NEXT: Stmt_store(c0);
|
||||
|
||||
; CODEGEN-LABEL: polly.cond:
|
||||
; CODEGEN-NEXT: %[[R1:[0-9]*]] = ptrtoint float* %P to i64
|
||||
; CODEGEN-NEXT: %[[R2:[0-9]*]] = icmp sle i64 %[[R1]], -1
|
||||
; CODEGEN-NEXT: br i1 %[[R2]]
|
||||
; CODEGEN-LABEL: polly.cond2:
|
||||
; CODEGEN-NEXT: %[[R3:[0-9]*]] = ptrtoint float* %P to i64
|
||||
; CODEGEN-NEXT: %[[R4:[0-9]*]] = icmp sge i64 %[[R3]], 1
|
||||
; CODEGEN-NEXT: br i1 %[[R4]]
|
||||
|
||||
|
|
|
@ -34,22 +34,23 @@ return:
|
|||
ret void
|
||||
}
|
||||
|
||||
; CHECK: if (Q >= P + 1) {
|
||||
; CHECK: for (int c0 = 0; c0 < N; c0 += 1)
|
||||
; CHECK: Stmt_store(c0);
|
||||
; CHECK: } else if (P >= Q + 1)
|
||||
; CHECK: for (int c0 = 0; c0 < N; c0 += 1)
|
||||
; CHECK: Stmt_store(c0);
|
||||
; CHECK: }
|
||||
; CHECK: if (Q >= P + 1) {
|
||||
; CHECK-NEXT: for (int c0 = 0; c0 < N; c0 += 1)
|
||||
; CHECK-NEXT: Stmt_store(c0);
|
||||
; CHECK-NEXT: } else if (P >= Q + 1)
|
||||
; CHECK-NEXT: for (int c0 = 0; c0 < N; c0 += 1)
|
||||
; CHECK-NEXT: Stmt_store(c0);
|
||||
|
||||
; CODEGEN: polly.cond:
|
||||
; CODEGEN-NEXT: %[[Q:[_a-zA-Z0-9]+]] = ptrtoint float* %Q to i64
|
||||
; CODEGEN-NEXT: %[[P:[_a-zA-Z0-9]+]] = ptrtoint float* %P to i64
|
||||
; CODEGEN-NEXT: %[[PInc:[_a-zA-Z0-9]+]] = add nsw i64 %[[P]], 1
|
||||
; CODEGEN-NEXT: icmp sge i64 %[[Q]], %[[PInc]]
|
||||
; CODEGEN-NEXT: %[[CMP:[_a-zA-Z0-9]+]] = icmp sge i64 %[[Q]], %[[PInc]]
|
||||
; CODEGEN-NEXT: br i1 %[[CMP]]
|
||||
|
||||
; CODEGEN: polly.cond2:
|
||||
; CODEGEN-NEXT: %[[P2:[_a-zA-Z0-9]+]] = ptrtoint float* %P to i64
|
||||
; CODEGEN-NEXT: %[[Q2:[_a-zA-Z0-9]+]] = ptrtoint float* %Q to i64
|
||||
; CODEGEN-NEXT: %[[QInc:[_a-zA-Z0-9]+]] = add nsw i64 %[[Q2]], 1
|
||||
; CODEGEN-NEXT: icmp sge i64 %[[P2]], %[[QInc]]
|
||||
; CODEGEN-NEXT: %[[CMP2:[_a-zA-Z0-9]+]] = icmp sge i64 %[[P2]], %[[QInc]]
|
||||
; CODEGEN-NEXT: br i1 %[[CMP2]]
|
||||
|
|
Loading…
Reference in New Issue