diff options
author | Siddharth Bhat <siddu.druid@gmail.com> | 2017-07-07 14:02:27 +0000 |
---|---|---|
committer | Siddharth Bhat <siddu.druid@gmail.com> | 2017-07-07 14:02:27 +0000 |
commit | 7cd1f53ce7e2031dbaff4fbb25bd0c81004c46f5 (patch) | |
tree | 06aaf28f5c5e2059f03d2763ad1385ee21f8cf78 /polly | |
parent | 3f02123f7c3c4c33812ba7a1e6402c33dc0fd0d9 (diff) | |
download | llvm-7cd1f53ce7e2031dbaff4fbb25bd0c81004c46f5.zip llvm-7cd1f53ce7e2031dbaff4fbb25bd0c81004c46f5.tar.gz llvm-7cd1f53ce7e2031dbaff4fbb25bd0c81004c46f5.tar.bz2 |
[NFC] [PPCGCodeGeneration] Extend `invariant-load-hoisting-with-variable-upper-bound` test case.
- Check that we have invariant accesses.
- Use `-polly-use-llvm-names` for better names in the test.
- Rename test function to `f` for brevity.
llvm-svn: 307401
Diffstat (limited to 'polly')
-rw-r--r-- | polly/test/GPGPU/invariant-load-hoisting-with-variable-upper-bound.ll | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/polly/test/GPGPU/invariant-load-hoisting-with-variable-upper-bound.ll b/polly/test/GPGPU/invariant-load-hoisting-with-variable-upper-bound.ll index 4823c57..ab5be4f 100644 --- a/polly/test/GPGPU/invariant-load-hoisting-with-variable-upper-bound.ll +++ b/polly/test/GPGPU/invariant-load-hoisting-with-variable-upper-bound.ll @@ -1,12 +1,17 @@ -; RUN: opt %loadPolly -analyze -polly-scops -polly-invariant-load-hoisting < %s | FileCheck %s -check-prefix=SCOP -; RUN: opt %loadPolly -S -polly-codegen-ppcg -polly-invariant-load-hoisting < %s | FileCheck %s -check-prefix=HOST-IR +; RUN: opt %loadPolly -analyze -polly-use-llvm-names -polly-scops -polly-invariant-load-hoisting < %s | FileCheck %s -check-prefix=SCOP +; RUN: opt %loadPolly -S -polly-use-llvm-names -polly-codegen-ppcg -polly-invariant-load-hoisting < %s | FileCheck %s -check-prefix=HOST-IR ; REQUIRES: pollyacc -; Check that we detect a scop. -; SCOP: Function: breakInvaritantLoadHoisting +; Check that we detect a scop with invariant accesses. +; SCOP: Function: f ; SCOP-NEXT: Region: %entry.split---%for.end ; SCOP-NEXT: Max Loop Depth: 1 +; SCOP-NEXT: Invariant Accesses: { +; SCOP-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0] +; SCOP-NEXT: [tmp2] -> { Stmt_for_body[i0] -> MemRef_idx[0] }; +; SCOP-NEXT: Execution Context: [tmp2] -> { : } +; SCOP-NEXT: } ; Check that kernel launch is generated in host IR. ; the declare would not be generated unless a call to a kernel exists. @@ -14,7 +19,7 @@ ; Check if we generate GPU code for simple loop with variable upper bound. ; This always worked, but have this test to prevent regressions. -; void breakInvaritantLoadHoisting(int *idx, int *arr) { +; void f(int *idx, int *arr) { ; for (int i = 0; i < *idx; i++) { ; arr[i] = 0; ; } @@ -22,7 +27,7 @@ ; target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" -define void @breakInvaritantLoadHoisting(i32* %idx, i32* %arr) { +define void @f(i32* %idx, i32* %arr) { entry: br label %entry.split |