diff options
Diffstat (limited to 'test/Transforms')
-rw-r--r-- | test/Transforms/GlobalOpt/malloc-promote-2.ll | 4 | ||||
-rw-r--r-- | test/Transforms/GlobalOpt/malloc-promote-3.ll | 4 | ||||
-rw-r--r-- | test/Transforms/InstCombine/cast-malloc.ll | 2 | ||||
-rw-r--r-- | test/Transforms/InstCombine/cast.ll | 6 | ||||
-rw-r--r-- | test/Transforms/InstCombine/getelementptr.ll | 2 | ||||
-rw-r--r-- | test/Transforms/InstCombine/malloc-free-delete.ll | 2 | ||||
-rw-r--r-- | test/Transforms/InstCombine/malloc2.ll | 1 |
7 files changed, 12 insertions, 9 deletions
diff --git a/test/Transforms/GlobalOpt/malloc-promote-2.ll b/test/Transforms/GlobalOpt/malloc-promote-2.ll index 0d03835..d3d2252 100644 --- a/test/Transforms/GlobalOpt/malloc-promote-2.ll +++ b/test/Transforms/GlobalOpt/malloc-promote-2.ll @@ -1,4 +1,6 @@ -; RUN: opt < %s -globalopt -S | not grep malloc +; RUN: opt < %s -globalopt -globaldce -S | not grep malloc +target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" +target triple = "i686-apple-darwin8" @G = internal global i32* null ; <i32**> [#uses=3] diff --git a/test/Transforms/GlobalOpt/malloc-promote-3.ll b/test/Transforms/GlobalOpt/malloc-promote-3.ll index d4ee4e8..a920b61 100644 --- a/test/Transforms/GlobalOpt/malloc-promote-3.ll +++ b/test/Transforms/GlobalOpt/malloc-promote-3.ll @@ -1,4 +1,6 @@ -; RUN: opt < %s -globalopt -S | not grep malloc +; RUN: opt < %s -globalopt -globaldce -S | not grep malloc +target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" +target triple = "i686-apple-darwin8" @G = internal global i32* null ; <i32**> [#uses=4] diff --git a/test/Transforms/InstCombine/cast-malloc.ll b/test/Transforms/InstCombine/cast-malloc.ll index 3754032..43a1489 100644 --- a/test/Transforms/InstCombine/cast-malloc.ll +++ b/test/Transforms/InstCombine/cast-malloc.ll @@ -1,6 +1,6 @@ ; test that casted mallocs get converted to malloc of the right type ; RUN: opt < %s -instcombine -S | \ -; RUN: not grep bitcast +; RUN: grep bitcast | count 1 ; The target datalayout is important for this test case. We have to tell ; instcombine that the ABI alignment for a long is 4-bytes, not 8, otherwise diff --git a/test/Transforms/InstCombine/cast.ll b/test/Transforms/InstCombine/cast.ll index 59d7cd0..2722267 100644 --- a/test/Transforms/InstCombine/cast.ll +++ b/test/Transforms/InstCombine/cast.ll @@ -79,9 +79,9 @@ define void @test11(i32* %P) { } define i32* @test12() { - %p = malloc [4 x i8] ; <[4 x i8]*> [#uses=1] - %c = bitcast [4 x i8]* %p to i32* ; <i32*> [#uses=1] - ret i32* %c + %c = malloc [4 x i8] ; <[4 x i8]*> [#uses=1] + %p = bitcast [4 x i8]* %c to i32* ; <i32*> [#uses=1] + ret i32* %p } define i8* @test13(i64 %A) { %c = getelementptr [0 x i8]* bitcast ([32832 x i8]* @inbuf to [0 x i8]*), i64 0, i64 %A ; <i8*> [#uses=1] diff --git a/test/Transforms/InstCombine/getelementptr.ll b/test/Transforms/InstCombine/getelementptr.ll index ffaa6af..285e0ba 100644 --- a/test/Transforms/InstCombine/getelementptr.ll +++ b/test/Transforms/InstCombine/getelementptr.ll @@ -58,7 +58,7 @@ define i32* @test6() { %B = getelementptr i32* %A, i64 2 ret i32* %B ; CHECK: @test6 -; CHECK: getelementptr [4 x i32]* %M, i64 0, i64 2 +; CHECK: getelementptr i8* %malloccall, i64 8 } define i32* @test7(i32* %I, i64 %C, i64 %D) { diff --git a/test/Transforms/InstCombine/malloc-free-delete.ll b/test/Transforms/InstCombine/malloc-free-delete.ll index 2ed5ec6..fd91e44 100644 --- a/test/Transforms/InstCombine/malloc-free-delete.ll +++ b/test/Transforms/InstCombine/malloc-free-delete.ll @@ -1,5 +1,5 @@ ; RUN: opt < %s -instcombine -S | grep {ret i32 0} -; RUN: opt < %s -instcombine -S | not grep malloc +; RUN: opt < %s -instcombine -globaldce -S | not grep malloc ; PR1201 define i32 @main(i32 %argc, i8** %argv) { %c_19 = alloca i8* ; <i8**> [#uses=2] diff --git a/test/Transforms/InstCombine/malloc2.ll b/test/Transforms/InstCombine/malloc2.ll index 102422e..cc1506b 100644 --- a/test/Transforms/InstCombine/malloc2.ll +++ b/test/Transforms/InstCombine/malloc2.ll @@ -1,5 +1,4 @@ ; RUN: opt < %s -instcombine -S | grep {ret i32 0} -; RUN: opt < %s -instcombine -S | not grep malloc ; PR1313 define i32 @test1(i32 %argc, i8* %argv, i8* %envp) { |