llvm.org GIT mirror llvm / 600d52c
Add targetdata strings to these tests, since SimplifyLibCalls uses TargetData to find the pointer size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79490 91177308-0d34-0410-b5e6-96231b3b80d8 Dan Gohman 10 years ago
8 changed file(s) with 32 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
0 ; Test that the FPrintFOptimizer works correctly
11 ; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | \
22 ; RUN: not grep {call.*fprintf}
3 ;
3
4 ; This transformation requires the pointer size, as it assumes that size_t is
5 ; the size of a pointer.
6 target datalayout = "-p:64:64:64"
47
58 %struct._IO_FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct._IO_FILE*, i32, i32, i32, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i32, [52 x i8] }
69 %struct._IO_marker = type { %struct._IO_marker*, %struct._IO_FILE*, i32 }
0 ; Test that the PutsCatOptimizer works correctly
11 ; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | \
22 ; RUN: not grep {call.*fputs}
3 ;
3
4 ; This transformation requires the pointer size, as it assumes that size_t is
5 ; the size of a pointer.
6 target datalayout = "-p:64:64:64"
47
58 %struct._IO_FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct._IO_FILE*, i32, i32, i32, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i32, [52 x i8] }
69 %struct._IO_marker = type { %struct._IO_marker*, %struct._IO_FILE*, i32 }
0 ; Test that the SPrintFOptimizer works correctly
11 ; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | \
22 ; RUN: not grep {call.*sprintf}
3
4 ; This transformation requires the pointer size, as it assumes that size_t is
5 ; the size of a pointer.
6 target datalayout = "-p:64:64:64"
37
48 @hello = constant [6 x i8] c"hello\00" ; <[6 x i8]*> [#uses=1]
59 @null = constant [1 x i8] zeroinitializer ; <[1 x i8]*> [#uses=1]
33 ; RUN: not grep {call.*strcat}
44 ; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | \
55 ; RUN: grep {puts.*%arg1}
6
7 ; This transformation requires the pointer size, as it assumes that size_t is
8 ; the size of a pointer.
9 target datalayout = "-p:64:64:64"
610
711 @hello = constant [6 x i8] c"hello\00" ; <[6 x i8]*> [#uses=1]
812 @null = constant [1 x i8] zeroinitializer ; <[1 x i8]*> [#uses=1]
0 ; Test that the StrChrOptimizer works correctly
11 ; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | \
22 ; RUN: not grep {call.*@strchr}
3
4 ; This transformation requires the pointer size, as it assumes that size_t is
5 ; the size of a pointer.
6 target datalayout = "-p:64:64:64"
37
48 @hello = constant [14 x i8] c"hello world\5Cn\00" ; <[14 x i8]*> [#uses=1]
59 @null = constant [1 x i8] zeroinitializer ; <[1 x i8]*> [#uses=1]
0 ; Test that the StrCpyOptimizer works correctly
11 ; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | \
22 ; RUN: not grep {call.*strcpy}
3
4 ; This transformation requires the pointer size, as it assumes that size_t is
5 ; the size of a pointer.
6 target datalayout = "-p:64:64:64"
37
48 @hello = constant [6 x i8] c"hello\00" ; <[6 x i8]*> [#uses=1]
59 @null = constant [1 x i8] zeroinitializer ; <[1 x i8]*> [#uses=1]
22 ; RUN: not grep {call.*strncat}
33 ; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | \
44 ; RUN: grep {puts.*%arg1}
5
6 ; This transformation requires the pointer size, as it assumes that size_t is
7 ; the size of a pointer.
8 target datalayout = "-p:64:64:64"
59
610 @hello = constant [6 x i8] c"hello\00" ; <[6 x i8]*> [#uses=1]
711 @null = constant [1 x i8] zeroinitializer ; <[1 x i8]*> [#uses=1]
0 ; Test that the StrNCpyOptimizer works correctly
11 ; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | \
22 ; RUN: not grep {call.*strncpy}
3
4 ; This transformation requires the pointer size, as it assumes that size_t is
5 ; the size of a pointer.
6 target datalayout = "-p:64:64:64"
37
48 @hello = constant [6 x i8] c"hello\00" ; <[6 x i8]*> [#uses=1]
59 @null = constant [1 x i8] zeroinitializer ; <[1 x i8]*> [#uses=1]