aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/SimplifyLibCalls
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-04-15 05:16:38 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-04-15 05:16:38 +0000
commit894cfffea16384d0121d9a50a5e7ba2be3dd2fa7 (patch)
treebc21b38ebc67c4d38eef3f8cf8def8774981c813 /test/Transforms/SimplifyLibCalls
parent950c694e94f8ab7fcb3136e2fd0d578b37cbc50e (diff)
downloadexternal_llvm-894cfffea16384d0121d9a50a5e7ba2be3dd2fa7.zip
external_llvm-894cfffea16384d0121d9a50a5e7ba2be3dd2fa7.tar.gz
external_llvm-894cfffea16384d0121d9a50a5e7ba2be3dd2fa7.tar.bz2
For PR1319:
Convert to new test system. This exposes IsDigit.ll as failing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36046 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/SimplifyLibCalls')
-rw-r--r--test/Transforms/SimplifyLibCalls/2007-04-06-strchr-miscompile.ll9
-rw-r--r--test/Transforms/SimplifyLibCalls/ExitInMain.ll4
-rw-r--r--test/Transforms/SimplifyLibCalls/IsDigit.ll3
-rw-r--r--test/Transforms/SimplifyLibCalls/MemSet.ll16
-rw-r--r--test/Transforms/SimplifyLibCalls/Pow.ll5
-rw-r--r--test/Transforms/SimplifyLibCalls/dg.exp4
-rw-r--r--test/Transforms/SimplifyLibCalls/floor.ll18
7 files changed, 36 insertions, 23 deletions
diff --git a/test/Transforms/SimplifyLibCalls/2007-04-06-strchr-miscompile.ll b/test/Transforms/SimplifyLibCalls/2007-04-06-strchr-miscompile.ll
index 7c78355..5a56d24 100644
--- a/test/Transforms/SimplifyLibCalls/2007-04-06-strchr-miscompile.ll
+++ b/test/Transforms/SimplifyLibCalls/2007-04-06-strchr-miscompile.ll
@@ -1,8 +1,9 @@
-; RUN: llvm-as < %s | opt -simplify-libcalls -instcombine | llvm-dis > %t &&
-; RUN: grep '@str,.*i64 3' %t &&
-; RUN: grep '@str1,.*i64 7' %t &&
-; RUN: grep 'ret i8.*null' %t
; PR1307
+; RUN: llvm-as < %s | opt -simplify-libcalls -instcombine | llvm-dis > %t
+; RUN: grep {@str,.*i64 3} %t
+; RUN: grep {@str1,.*i64 7} %t
+; RUN: grep {ret i8.*null} %t
+; END.
@str = internal constant [5 x i8] c"foog\00"
@str1 = internal constant [8 x i8] c"blahhh!\00"
diff --git a/test/Transforms/SimplifyLibCalls/ExitInMain.ll b/test/Transforms/SimplifyLibCalls/ExitInMain.ll
index f8af2ec..13f1a11 100644
--- a/test/Transforms/SimplifyLibCalls/ExitInMain.ll
+++ b/test/Transforms/SimplifyLibCalls/ExitInMain.ll
@@ -1,5 +1,7 @@
; Test that the ExitInMainOptimization pass works correctly
-; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | grep -c 'ret i32 3' | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \
+; RUN: grep -c {ret i32 3} | grep 1
+; END.
declare void %exit(int)
declare void %exitonly(int)
diff --git a/test/Transforms/SimplifyLibCalls/IsDigit.ll b/test/Transforms/SimplifyLibCalls/IsDigit.ll
index 1386c14..bcdb60c 100644
--- a/test/Transforms/SimplifyLibCalls/IsDigit.ll
+++ b/test/Transforms/SimplifyLibCalls/IsDigit.ll
@@ -1,5 +1,6 @@
; Test that the IsDigitOptimizer works correctly
-; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call'
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \
+; RUN: not grep call
declare int %isdigit(int)
declare int %isascii(int)
diff --git a/test/Transforms/SimplifyLibCalls/MemSet.ll b/test/Transforms/SimplifyLibCalls/MemSet.ll
index d31a36a..dbeef9d 100644
--- a/test/Transforms/SimplifyLibCalls/MemSet.ll
+++ b/test/Transforms/SimplifyLibCalls/MemSet.ll
@@ -1,17 +1,19 @@
; Test that the LLVMMemSetOptimizer works correctly
-; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*llvm.memset'
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \
+; RUN: not grep {call.*llvm.memset}
+; END.
-declare void %llvm.memset(sbyte*,ubyte,uint,uint)
+declare void %llvm.memset.i32(sbyte*,ubyte,uint,uint)
implementation ; Functions:
int %main () {
%target = alloca [1024 x sbyte]
%target_p = getelementptr [1024 x sbyte]* %target, int 0, int 0
- call void %llvm.memset(sbyte* %target_p, ubyte 1, uint 0, uint 1)
- call void %llvm.memset(sbyte* %target_p, ubyte 1, uint 1, uint 1)
- call void %llvm.memset(sbyte* %target_p, ubyte 1, uint 2, uint 2)
- call void %llvm.memset(sbyte* %target_p, ubyte 1, uint 4, uint 4)
- call void %llvm.memset(sbyte* %target_p, ubyte 1, uint 8, uint 8)
+ call void %llvm.memset.i32(sbyte* %target_p, ubyte 1, uint 0, uint 1)
+ call void %llvm.memset.i32(sbyte* %target_p, ubyte 1, uint 1, uint 1)
+ call void %llvm.memset.i32(sbyte* %target_p, ubyte 1, uint 2, uint 2)
+ call void %llvm.memset.i32(sbyte* %target_p, ubyte 1, uint 4, uint 4)
+ call void %llvm.memset.i32(sbyte* %target_p, ubyte 1, uint 8, uint 8)
ret int 0
}
diff --git a/test/Transforms/SimplifyLibCalls/Pow.ll b/test/Transforms/SimplifyLibCalls/Pow.ll
index df7d460..773ba1e 100644
--- a/test/Transforms/SimplifyLibCalls/Pow.ll
+++ b/test/Transforms/SimplifyLibCalls/Pow.ll
@@ -1,8 +1,9 @@
; Testcase for calls to the standard C "pow" function
;
; Equivalent to: http://gcc.gnu.org/ml/gcc-patches/2003-02/msg01786.html
-; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls -disable-output &&
-; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call double .pow'
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \
+; RUN: not grep {call double .pow}
+; END.
declare double %pow(double, double)
diff --git a/test/Transforms/SimplifyLibCalls/dg.exp b/test/Transforms/SimplifyLibCalls/dg.exp
index ff34508..879685c 100644
--- a/test/Transforms/SimplifyLibCalls/dg.exp
+++ b/test/Transforms/SimplifyLibCalls/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/SimplifyLibCalls/floor.ll b/test/Transforms/SimplifyLibCalls/floor.ll
index d1c6548..06f159f 100644
--- a/test/Transforms/SimplifyLibCalls/floor.ll
+++ b/test/Transforms/SimplifyLibCalls/floor.ll
@@ -1,9 +1,15 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*floor(' &&
-; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | grep 'call.*floorf('
-; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*ceil(' &&
-; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | grep 'call.*ceilf('
-; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*nearbyint(' &&
-; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | grep 'call.*nearbyintf('
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \
+; RUN: not grep {call.*floor(} &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \
+; RUN: grep {call.*floorf(}
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \
+; RUN: not grep {call.*ceil(} &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \
+; RUN: grep {call.*ceilf(}
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \
+; RUN: not grep {call.*nearbyint(} &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \
+; RUN: grep {call.*nearbyintf(}
; XFAIL: sparc
declare double %floor(double)