diff options
author | Chris Lattner <sabre@nondot.org> | 2009-11-28 16:08:18 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-11-28 16:08:18 +0000 |
commit | 0c264b16b0e8a373888d1a5cfeb90af4fda3cd14 (patch) | |
tree | 2d127a4a10abe1670f5066b3c3eb69e26f732996 /test | |
parent | dd696052f0e4ecc973d105be19cf1b4b72f9a0c4 (diff) | |
download | external_llvm-0c264b16b0e8a373888d1a5cfeb90af4fda3cd14.zip external_llvm-0c264b16b0e8a373888d1a5cfeb90af4fda3cd14.tar.gz external_llvm-0c264b16b0e8a373888d1a5cfeb90af4fda3cd14.tar.bz2 |
reenable load address insertion in load pre. This allows us to
handle cases like this:
void test(int N, double* G) {
long j;
for (j = 1; j < N - 1; j++)
G[j+1] = G[j] + G[j+1];
}
where G[1] isn't live into the loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90041 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/GVN/pre-load.ll | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/test/Transforms/GVN/pre-load.ll b/test/Transforms/GVN/pre-load.ll index c055e86..aa9e2b0 100644 --- a/test/Transforms/GVN/pre-load.ll +++ b/test/Transforms/GVN/pre-load.ll @@ -86,9 +86,9 @@ block1: block2: br label %block4 -; HECK: block2: -; HECK: load i32* -; HECK: br label %block4 +; CHECK: block2: +; CHECK: load i32* +; CHECK: br label %block4 block3: %B = getelementptr i32* %q, i32 1 @@ -103,10 +103,10 @@ block4: %P3 = getelementptr i32* %P2, i32 1 %PRE = load i32* %P3 ret i32 %PRE -; HECK: block4: -; HECK-NEXT: phi i32 [ -; HECK-NOT: load -; HECK: ret i32 +; CHECK: block4: +; CHECK-NEXT: phi i32 [ +; CHECK-NOT: load +; CHECK: ret i32 } ;void test5(int N, double *G) { @@ -248,9 +248,9 @@ block1: block2: br label %block4 -; HECK: block2: -; HECK: load i32* -; HECK: br label %block4 +; CHECK: block2: +; CHECK: load i32* +; CHECK: br label %block4 block3: %A = getelementptr i32* %p, i32 1 @@ -262,10 +262,10 @@ block4: %P3 = getelementptr i32* %P2, i32 1 %PRE = load i32* %P3 ret i32 %PRE -; HECK: block4: -; HECK-NEXT: phi i32 [ -; HECK-NOT: load -; HECK: ret i32 +; CHECK: block4: +; CHECK-NEXT: phi i32 [ +; CHECK-NOT: load +; CHECK: ret i32 } |