diff options
Diffstat (limited to 'test/Transforms/GlobalOpt')
-rw-r--r-- | test/Transforms/GlobalOpt/constantexpr-dangle.ll | 4 | ||||
-rw-r--r-- | test/Transforms/GlobalOpt/dg.exp | 4 | ||||
-rw-r--r-- | test/Transforms/GlobalOpt/integer-bool.ll | 2 | ||||
-rw-r--r-- | test/Transforms/GlobalOpt/memcpy.ll | 2 | ||||
-rw-r--r-- | test/Transforms/GlobalOpt/memset.ll | 12 | ||||
-rw-r--r-- | test/Transforms/GlobalOpt/storepointer-compare.llx | 3 |
6 files changed, 16 insertions, 11 deletions
diff --git a/test/Transforms/GlobalOpt/constantexpr-dangle.ll b/test/Transforms/GlobalOpt/constantexpr-dangle.ll index 89ce1ee..6e33ae0 100644 --- a/test/Transforms/GlobalOpt/constantexpr-dangle.ll +++ b/test/Transforms/GlobalOpt/constantexpr-dangle.ll @@ -1,4 +1,6 @@ -; RUN: llvm-as < %s | opt -instcombine -globalopt | llvm-dis | grep 'internal fastcc float @foo' +; RUN: llvm-as < %s | opt -instcombine -globalopt | llvm-dis | \ +; RUN: grep {internal fastcc float @foo} + define internal float @foo() { ret float 0.000000e+00 } diff --git a/test/Transforms/GlobalOpt/dg.exp b/test/Transforms/GlobalOpt/dg.exp index ff34508..879685c 100644 --- a/test/Transforms/GlobalOpt/dg.exp +++ b/test/Transforms/GlobalOpt/dg.exp @@ -1,3 +1,3 @@ -load_lib llvm-dg.exp +load_lib llvm.exp -llvm-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] diff --git a/test/Transforms/GlobalOpt/integer-bool.ll b/test/Transforms/GlobalOpt/integer-bool.ll index 29cb4f5..eef2f72 100644 --- a/test/Transforms/GlobalOpt/integer-bool.ll +++ b/test/Transforms/GlobalOpt/integer-bool.ll @@ -1,5 +1,5 @@ ; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt -instcombine | \ -; RUN: llvm-dis | grep 'ret i1 true' +; RUN: llvm-dis | grep {ret i1 true} ;; check that global opt turns integers that only hold 0 or 1 into bools. diff --git a/test/Transforms/GlobalOpt/memcpy.ll b/test/Transforms/GlobalOpt/memcpy.ll index ea4483f..a110d40 100644 --- a/test/Transforms/GlobalOpt/memcpy.ll +++ b/test/Transforms/GlobalOpt/memcpy.ll @@ -1,5 +1,5 @@ ; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt | llvm-dis | \ -; RUN: grep 'G1 = internal constant' +; RUN: grep {G1 = internal constant} %G1 = internal global [58 x sbyte] c"asdlfkajsdlfkajsd;lfkajds;lfkjasd;flkajsd;lkfja;sdlkfjasd\00" diff --git a/test/Transforms/GlobalOpt/memset.ll b/test/Transforms/GlobalOpt/memset.ll index 5159d28..a4f81c3 100644 --- a/test/Transforms/GlobalOpt/memset.ll +++ b/test/Transforms/GlobalOpt/memset.ll @@ -1,20 +1,22 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt | llvm-dis | not grep internal ; both globals are write only, delete them. +; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt | llvm-dis | \ +; RUN: not grep internal + %G0 = internal global [58 x sbyte] c"asdlfkajsdlfkajsd;lfkajds;lfkjasd;flkajsd;lkfja;sdlkfjasd\00" %G1 = internal global [4 x int] [ int 1, int 2, int 3, int 4] implementation ; Functions: -declare void %llvm.memcpy(sbyte*, sbyte*, uint, uint) -declare void %llvm.memset(sbyte*, ubyte, uint, uint) +declare void %llvm.memcpy.i32(sbyte*, sbyte*, uint, uint) +declare void %llvm.memset.i32(sbyte*, ubyte, uint, uint) void %foo() { %Blah = alloca [58 x sbyte] ; <[58 x sbyte]*> [#uses=2] %tmp3 = cast [58 x sbyte]* %Blah to sbyte* - call void %llvm.memcpy( sbyte* cast ([4 x int]* %G1 to sbyte*), sbyte* %tmp3, uint 16, uint 1) - call void %llvm.memset( sbyte* getelementptr ([58 x sbyte]* %G0, int 0, int 0), uint 17, uint 58, uint 1) + call void %llvm.memcpy.i32( sbyte* cast ([4 x int]* %G1 to sbyte*), sbyte* %tmp3, uint 16, uint 1) + call void %llvm.memset.i32( sbyte* getelementptr ([58 x sbyte]* %G0, int 0, int 0), uint 17, uint 58, uint 1) ret void } diff --git a/test/Transforms/GlobalOpt/storepointer-compare.llx b/test/Transforms/GlobalOpt/storepointer-compare.llx index 688cf1a..d85d97d 100644 --- a/test/Transforms/GlobalOpt/storepointer-compare.llx +++ b/test/Transforms/GlobalOpt/storepointer-compare.llx @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt | llvm-dis | grep 'call void @Actual' +; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt | llvm-dis | \ +; RUN: grep {call void @Actual} ; Check that a comparison does not prevent an indirect call from being made ; direct. The global will still remain, but indirect call elim is still good. |