diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2011-02-20 12:57:14 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2011-02-20 12:57:14 +0000 |
commit | cf099d11218cb6f6c5cce947d6738e347f07fb12 (patch) | |
tree | d2b61ce94e654cb01a254d2195259db5f9cc3f3c /test/Transforms/LICM | |
parent | 49011b52fcba02a6051957b84705159f52fae4e4 (diff) | |
download | src-cf099d11218cb6f6c5cce947d6738e347f07fb12.tar.gz src-cf099d11218cb6f6c5cce947d6738e347f07fb12.zip |
Vendor import of llvm trunk r126079:vendor/llvm/llvm-r126079
Notes
Notes:
svn path=/vendor/llvm/dist/; revision=218885
svn path=/vendor/llvm/llvm-r126079/; revision=218886; tag=vendor/llvm/llvm-r126079
Diffstat (limited to 'test/Transforms/LICM')
-rw-r--r-- | test/Transforms/LICM/2003-02-27-NestedLoopExitBlocks.ll | 2 | ||||
-rw-r--r-- | test/Transforms/LICM/2008-07-22-LoadGlobalConstant.ll | 2 | ||||
-rw-r--r-- | test/Transforms/LICM/2009-03-25-AliasSetTracker.ll | 39 | ||||
-rw-r--r-- | test/Transforms/LICM/crash.ll | 13 | ||||
-rw-r--r-- | test/Transforms/LICM/scalar_promote.ll | 32 |
5 files changed, 46 insertions, 42 deletions
diff --git a/test/Transforms/LICM/2003-02-27-NestedLoopExitBlocks.ll b/test/Transforms/LICM/2003-02-27-NestedLoopExitBlocks.ll index 4782bd17f893..4559e3101792 100644 --- a/test/Transforms/LICM/2003-02-27-NestedLoopExitBlocks.ll +++ b/test/Transforms/LICM/2003-02-27-NestedLoopExitBlocks.ll @@ -1,6 +1,6 @@ ; Exit blocks need to be updated for all nested loops... -; RUN: opt < %s -loopsimplify +; RUN: opt < %s -loop-simplify define i32 @yyparse() { bb0: diff --git a/test/Transforms/LICM/2008-07-22-LoadGlobalConstant.ll b/test/Transforms/LICM/2008-07-22-LoadGlobalConstant.ll index 10b00bab8fd9..d4df26e67abc 100644 --- a/test/Transforms/LICM/2008-07-22-LoadGlobalConstant.ll +++ b/test/Transforms/LICM/2008-07-22-LoadGlobalConstant.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -licm -S | FileCheck %s +; RUN: opt < %s -basicaa -licm -S | FileCheck %s @a = external constant float* diff --git a/test/Transforms/LICM/2009-03-25-AliasSetTracker.ll b/test/Transforms/LICM/2009-03-25-AliasSetTracker.ll deleted file mode 100644 index d1fe48c2357a..000000000000 --- a/test/Transforms/LICM/2009-03-25-AliasSetTracker.ll +++ /dev/null @@ -1,39 +0,0 @@ - -; RUN: opt < %s -licm -loop-index-split -instcombine -disable-output - - %struct.FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct.FILE*, i32, i32, i32, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i8*, i8*, i32, i32, [40 x i8] } - %struct._IO_marker = type { %struct._IO_marker*, %struct.FILE*, i32 } -@"\01LC81" = external constant [4 x i8] ; <[4 x i8]*> [#uses=1] - -define fastcc void @hex_dump_internal(i8* %avcl, %struct.FILE* %f, i32 %level, i8* nocapture %buf, i32 %size) nounwind { -entry: - br i1 false, label %bb4, label %return - -bb4: ; preds = %bb30, %entry - br label %bb6 - -bb6: ; preds = %bb15, %bb4 - %j.0.reg2mem.0 = phi i32 [ %2, %bb15 ], [ 0, %bb4 ] ; <i32> [#uses=2] - %0 = icmp slt i32 %j.0.reg2mem.0, 0 ; <i1> [#uses=1] - br i1 %0, label %bb7, label %bb13 - -bb7: ; preds = %bb6 - br label %bb15 - -bb13: ; preds = %bb6 - %1 = tail call i32 @fwrite(i8* getelementptr ([4 x i8]* @"\01LC81", i32 0, i32 0), i32 1, i32 3, i8* null) nounwind ; <i32> [#uses=0] - br label %bb15 - -bb15: ; preds = %bb13, %bb7 - %2 = add i32 %j.0.reg2mem.0, 1 ; <i32> [#uses=2] - %3 = icmp sgt i32 %2, 15 ; <i1> [#uses=1] - br i1 %3, label %bb30, label %bb6 - -bb30: ; preds = %bb15 - br i1 false, label %bb4, label %return - -return: ; preds = %bb30, %entry - ret void -} - -declare i32 @fwrite(i8* nocapture, i32, i32, i8* nocapture) nounwind diff --git a/test/Transforms/LICM/crash.ll b/test/Transforms/LICM/crash.ll index 88be5c41ccc5..ff7fa0b19a82 100644 --- a/test/Transforms/LICM/crash.ll +++ b/test/Transforms/LICM/crash.ll @@ -59,3 +59,16 @@ for.end: ; preds = %for.cond, %entry } declare i32* @test3helper(i32*) + + +; PR8602 +@g_47 = external global i32, align 4 + +define void @test4() noreturn nounwind { + br label %1 + +; <label>:1 ; preds = %1, %0 + volatile store i32* @g_47, i32** undef, align 8 + store i32 undef, i32* @g_47, align 4 + br label %1 +} diff --git a/test/Transforms/LICM/scalar_promote.ll b/test/Transforms/LICM/scalar_promote.ll index c1d2b24b0bba..d8acdc1a3ad7 100644 --- a/test/Transforms/LICM/scalar_promote.ll +++ b/test/Transforms/LICM/scalar_promote.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -licm -S | FileCheck %s +; RUN: opt < %s -basicaa -licm -S | FileCheck %s target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" @X = global i32 7 ; <i32*> [#uses=4] @@ -118,3 +118,33 @@ exit: ret void } +define void @test5(i32 %i, i32** noalias %P2) { +Entry: + br label %Loop +; CHECK: @test5 +; CHECK: Entry: +; CHECK-NEXT: load i32* @X +; CHECK-NEXT: br label %Loop + + +Loop: ; preds = %Loop, %0 + %j = phi i32 [ 0, %Entry ], [ %Next, %Loop ] ; <i32> [#uses=1] + %x = load i32* @X ; <i32> [#uses=1] + %x2 = add i32 %x, 1 ; <i32> [#uses=1] + store i32 %x2, i32* @X + + volatile store i32* @X, i32** %P2 + + %Next = add i32 %j, 1 ; <i32> [#uses=2] + %cond = icmp eq i32 %Next, 0 ; <i1> [#uses=1] + br i1 %cond, label %Out, label %Loop + +Out: + ret void +; CHECK: Out: +; CHECK-NEXT: store i32 %x2, i32* @X +; CHECK-NEXT: ret void + +} + + |