From: Chris Lattner Date: Tue, 19 Feb 2008 17:33:52 +0000 (+0000) Subject: rename tests to avoid a test- prefix when they aren't related to the test instruction. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=22c31769fb1448dba3247780181d527a852d7694;p=oota-llvm.git rename tests to avoid a test- prefix when they aren't related to the test instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47329 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGen/X86/fold-load.ll b/test/CodeGen/X86/fold-load.ll new file mode 100644 index 00000000000..847d91e03b6 --- /dev/null +++ b/test/CodeGen/X86/fold-load.ll @@ -0,0 +1,29 @@ +; RUN: llvm-upgrade < %s | llvm-as | llc + %struct._obstack_chunk = type { sbyte*, %struct._obstack_chunk*, [4 x sbyte] } + %struct.obstack = type { int, %struct._obstack_chunk*, sbyte*, sbyte*, sbyte*, int, int, %struct._obstack_chunk* (...)*, void (...)*, sbyte*, ubyte } +%stmt_obstack = external global %struct.obstack ; <%struct.obstack*> [#uses=1] + +implementation ; Functions: + +void %expand_start_bindings() { +entry: + br bool false, label %cond_true, label %cond_next + +cond_true: ; preds = %entry + %new_size.0.i = select bool false, int 0, int 0 ; [#uses=1] + %tmp.i = load uint* cast (ubyte* getelementptr (%struct.obstack* %stmt_obstack, int 0, uint 10) to uint*) ; [#uses=1] + %tmp.i = cast uint %tmp.i to ubyte ; [#uses=1] + %tmp21.i = and ubyte %tmp.i, 1 ; [#uses=1] + %tmp22.i = seteq ubyte %tmp21.i, 0 ; [#uses=1] + br bool %tmp22.i, label %cond_false30.i, label %cond_true23.i + +cond_true23.i: ; preds = %cond_true + ret void + +cond_false30.i: ; preds = %cond_true + %tmp35.i = tail call %struct._obstack_chunk* null( int %new_size.0.i ) ; <%struct._obstack_chunk*> [#uses=0] + ret void + +cond_next: ; preds = %entry + ret void +} diff --git a/test/CodeGen/X86/hidden-vis.ll b/test/CodeGen/X86/hidden-vis.ll new file mode 100644 index 00000000000..058850c7b75 --- /dev/null +++ b/test/CodeGen/X86/hidden-vis.ll @@ -0,0 +1,20 @@ +; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu | \ +; RUN: grep .hidden | count 2 +; RUN: llvm-as < %s | llc -mtriple=i686-apple-darwin8.8.0 | \ +; RUN: grep .private_extern | count 2 + +%struct.Person = type { i32 } +@a = hidden global i32 0 +@b = external global i32 + + +define weak hidden void @_ZN6Person13privateMethodEv(%struct.Person* %this) { + ret void +} + +declare void @function(i32) + +define weak void @_ZN6PersonC1Ei(%struct.Person* %this, i32 %_c) { + ret void +} + diff --git a/test/CodeGen/X86/pic-1.ll b/test/CodeGen/X86/pic-1.ll new file mode 100644 index 00000000000..ab07718ad23 --- /dev/null +++ b/test/CodeGen/X86/pic-1.ll @@ -0,0 +1,19 @@ +; RUN: llvm-as < %s | \ +; RUN: llc -mtriple=i686-pc-linux-gnu -relocation-model=pic -o %t -f +; RUN: grep _GLOBAL_OFFSET_TABLE_ %t +; RUN: grep piclabel %t | count 3 +; RUN: grep GOT %t | count 3 +; RUN: not grep GOTOFF %t + +@ptr = external global i32* +@dst = external global i32 +@src = external global i32 + +define void @foo() { +entry: + store i32* @dst, i32** @ptr + %tmp.s = load i32* @src + store i32 %tmp.s, i32* @dst + ret void +} + diff --git a/test/CodeGen/X86/pic-2.ll b/test/CodeGen/X86/pic-2.ll new file mode 100644 index 00000000000..40899b35b8a --- /dev/null +++ b/test/CodeGen/X86/pic-2.ll @@ -0,0 +1,18 @@ +; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic \ +; RUN: -o %t -f +; RUN: grep _GLOBAL_OFFSET_TABLE_ %t +; RUN: grep piclabel %t | count 3 +; RUN: grep GOTOFF %t | count 4 + +@ptr = internal global i32* null +@dst = internal global i32 0 +@src = internal global i32 0 + +define void @foo() { +entry: + store i32* @dst, i32** @ptr + %tmp.s = load i32* @src + store i32 %tmp.s, i32* @dst + ret void +} + diff --git a/test/CodeGen/X86/pic-3.ll b/test/CodeGen/X86/pic-3.ll new file mode 100644 index 00000000000..bbec68209ba --- /dev/null +++ b/test/CodeGen/X86/pic-3.ll @@ -0,0 +1,15 @@ +; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic \ +; RUN: -o %t -f +; RUN: grep _GLOBAL_OFFSET_TABLE_ %t +; RUN: grep piclabel %t | count 3 +; RUN: grep PLT %t | count 1 + +define void @bar() { +entry: + call void(...)* @foo() + br label %return +return: + ret void +} + +declare void @foo(...) diff --git a/test/CodeGen/X86/pic-4.ll b/test/CodeGen/X86/pic-4.ll new file mode 100644 index 00000000000..49b9000f127 --- /dev/null +++ b/test/CodeGen/X86/pic-4.ll @@ -0,0 +1,22 @@ +; RUN: llvm-as < %s | \ +; RUN: llc -mtriple=i686-pc-linux-gnu -relocation-model=pic -o %t -f +; RUN: grep _GLOBAL_OFFSET_TABLE_ %t +; RUN: grep piclabel %t | count 3 +; RUN: grep PLT %t | count 1 +; RUN: grep GOT %t | count 1 +; RUN: not grep GOTOFF %t + +@pfoo = external global void(...)* + +define void @bar() { +entry: + %tmp = call void(...)*(...)* @afoo() + store void(...)* %tmp, void(...)** @pfoo + %tmp1 = load void(...)** @pfoo + call void(...)* %tmp1() + br label %return +return: + ret void +} + +declare void(...)* @afoo(...) diff --git a/test/CodeGen/X86/pic-5.ll b/test/CodeGen/X86/pic-5.ll new file mode 100644 index 00000000000..3f7e16934db --- /dev/null +++ b/test/CodeGen/X86/pic-5.ll @@ -0,0 +1,14 @@ +; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic \ +; RUN: -o %t -f +; RUN: grep _GLOBAL_OFFSET_TABLE_ %t +; RUN: grep piclabel %t | count 3 +; RUN: grep PLT %t | count 1 + +@ptr = external global i32* + +define void @foo() { +entry: + %ptr = malloc i32, i32 10 + ret void +} + diff --git a/test/CodeGen/X86/pic-6.ll b/test/CodeGen/X86/pic-6.ll new file mode 100644 index 00000000000..d55da1f4c6a --- /dev/null +++ b/test/CodeGen/X86/pic-6.ll @@ -0,0 +1,18 @@ +; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic \ +; RUN: -o %t -f +; RUN: grep _GLOBAL_OFFSET_TABLE_ %t +; RUN: grep piclabel %t | count 3 +; RUN: grep GOT %t | count 3 + +@ptr = global i32* null +@dst = global i32 0 +@src = global i32 0 + +define void @foo() { +entry: + store i32* @dst, i32** @ptr + %tmp.s = load i32* @src + store i32 %tmp.s, i32* @dst + ret void +} + diff --git a/test/CodeGen/X86/pic-cpool.ll b/test/CodeGen/X86/pic-cpool.ll new file mode 100644 index 00000000000..cac31ed2ad7 --- /dev/null +++ b/test/CodeGen/X86/pic-cpool.ll @@ -0,0 +1,14 @@ +; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic \ +; RUN: -o %t -f +; RUN: grep _GLOBAL_OFFSET_TABLE_ %t +; RUN: grep piclabel %t | count 3 +; RUN: grep GOTOFF %t | count 2 +; RUN: grep CPI %t | count 4 + +define double @foo(i32 %a.u) { +entry: + %tmp = icmp eq i32 %a.u,0 + %retval = select i1 %tmp, double 4.561230e+02, double 1.234560e+02 + ret double %retval +} + diff --git a/test/CodeGen/X86/pic-jtbl.ll b/test/CodeGen/X86/pic-jtbl.ll new file mode 100644 index 00000000000..e23f7c1a9fc --- /dev/null +++ b/test/CodeGen/X86/pic-jtbl.ll @@ -0,0 +1,58 @@ +; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic \ +; RUN: -o %t -f +; RUN: grep _GLOBAL_OFFSET_TABLE_ %t +; RUN: grep piclabel %t | count 3 +; RUN: grep PLT %t | count 6 +; RUN: grep GOTOFF %t | count 14 +; RUN: grep JTI %t | count 2 + +define void @bar(i32 %n.u) { +entry: + switch i32 %n.u, label %bb12 [i32 1, label %bb i32 2, label %bb6 i32 4, label %bb7 i32 5, label %bb8 i32 6, label %bb10 i32 7, label %bb1 i32 8, label %bb3 i32 9, label %bb4 i32 10, label %bb9 i32 11, label %bb2 i32 12, label %bb5 i32 13, label %bb11 ] +bb: + tail call void(...)* @foo1() + ret void +bb1: + tail call void(...)* @foo2() + ret void +bb2: + tail call void(...)* @foo6() + ret void +bb3: + tail call void(...)* @foo3() + ret void +bb4: + tail call void(...)* @foo4() + ret void +bb5: + tail call void(...)* @foo5() + ret void +bb6: + tail call void(...)* @foo1() + ret void +bb7: + tail call void(...)* @foo2() + ret void +bb8: + tail call void(...)* @foo6() + ret void +bb9: + tail call void(...)* @foo3() + ret void +bb10: + tail call void(...)* @foo4() + ret void +bb11: + tail call void(...)* @foo5() + ret void +bb12: + tail call void(...)* @foo6() + ret void +} + +declare void @foo1(...) +declare void @foo2(...) +declare void @foo6(...) +declare void @foo3(...) +declare void @foo4(...) +declare void @foo5(...) diff --git a/test/CodeGen/X86/test-hidden.ll b/test/CodeGen/X86/test-hidden.ll deleted file mode 100644 index 058850c7b75..00000000000 --- a/test/CodeGen/X86/test-hidden.ll +++ /dev/null @@ -1,20 +0,0 @@ -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu | \ -; RUN: grep .hidden | count 2 -; RUN: llvm-as < %s | llc -mtriple=i686-apple-darwin8.8.0 | \ -; RUN: grep .private_extern | count 2 - -%struct.Person = type { i32 } -@a = hidden global i32 0 -@b = external global i32 - - -define weak hidden void @_ZN6Person13privateMethodEv(%struct.Person* %this) { - ret void -} - -declare void @function(i32) - -define weak void @_ZN6PersonC1Ei(%struct.Person* %this, i32 %_c) { - ret void -} - diff --git a/test/CodeGen/X86/test-load-fold.ll b/test/CodeGen/X86/test-load-fold.ll deleted file mode 100644 index 847d91e03b6..00000000000 --- a/test/CodeGen/X86/test-load-fold.ll +++ /dev/null @@ -1,29 +0,0 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc - %struct._obstack_chunk = type { sbyte*, %struct._obstack_chunk*, [4 x sbyte] } - %struct.obstack = type { int, %struct._obstack_chunk*, sbyte*, sbyte*, sbyte*, int, int, %struct._obstack_chunk* (...)*, void (...)*, sbyte*, ubyte } -%stmt_obstack = external global %struct.obstack ; <%struct.obstack*> [#uses=1] - -implementation ; Functions: - -void %expand_start_bindings() { -entry: - br bool false, label %cond_true, label %cond_next - -cond_true: ; preds = %entry - %new_size.0.i = select bool false, int 0, int 0 ; [#uses=1] - %tmp.i = load uint* cast (ubyte* getelementptr (%struct.obstack* %stmt_obstack, int 0, uint 10) to uint*) ; [#uses=1] - %tmp.i = cast uint %tmp.i to ubyte ; [#uses=1] - %tmp21.i = and ubyte %tmp.i, 1 ; [#uses=1] - %tmp22.i = seteq ubyte %tmp21.i, 0 ; [#uses=1] - br bool %tmp22.i, label %cond_false30.i, label %cond_true23.i - -cond_true23.i: ; preds = %cond_true - ret void - -cond_false30.i: ; preds = %cond_true - %tmp35.i = tail call %struct._obstack_chunk* null( int %new_size.0.i ) ; <%struct._obstack_chunk*> [#uses=0] - ret void - -cond_next: ; preds = %entry - ret void -} diff --git a/test/CodeGen/X86/test-pic-1.ll b/test/CodeGen/X86/test-pic-1.ll deleted file mode 100644 index ab07718ad23..00000000000 --- a/test/CodeGen/X86/test-pic-1.ll +++ /dev/null @@ -1,19 +0,0 @@ -; RUN: llvm-as < %s | \ -; RUN: llc -mtriple=i686-pc-linux-gnu -relocation-model=pic -o %t -f -; RUN: grep _GLOBAL_OFFSET_TABLE_ %t -; RUN: grep piclabel %t | count 3 -; RUN: grep GOT %t | count 3 -; RUN: not grep GOTOFF %t - -@ptr = external global i32* -@dst = external global i32 -@src = external global i32 - -define void @foo() { -entry: - store i32* @dst, i32** @ptr - %tmp.s = load i32* @src - store i32 %tmp.s, i32* @dst - ret void -} - diff --git a/test/CodeGen/X86/test-pic-2.ll b/test/CodeGen/X86/test-pic-2.ll deleted file mode 100644 index 40899b35b8a..00000000000 --- a/test/CodeGen/X86/test-pic-2.ll +++ /dev/null @@ -1,18 +0,0 @@ -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic \ -; RUN: -o %t -f -; RUN: grep _GLOBAL_OFFSET_TABLE_ %t -; RUN: grep piclabel %t | count 3 -; RUN: grep GOTOFF %t | count 4 - -@ptr = internal global i32* null -@dst = internal global i32 0 -@src = internal global i32 0 - -define void @foo() { -entry: - store i32* @dst, i32** @ptr - %tmp.s = load i32* @src - store i32 %tmp.s, i32* @dst - ret void -} - diff --git a/test/CodeGen/X86/test-pic-3.ll b/test/CodeGen/X86/test-pic-3.ll deleted file mode 100644 index bbec68209ba..00000000000 --- a/test/CodeGen/X86/test-pic-3.ll +++ /dev/null @@ -1,15 +0,0 @@ -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic \ -; RUN: -o %t -f -; RUN: grep _GLOBAL_OFFSET_TABLE_ %t -; RUN: grep piclabel %t | count 3 -; RUN: grep PLT %t | count 1 - -define void @bar() { -entry: - call void(...)* @foo() - br label %return -return: - ret void -} - -declare void @foo(...) diff --git a/test/CodeGen/X86/test-pic-4.ll b/test/CodeGen/X86/test-pic-4.ll deleted file mode 100644 index 49b9000f127..00000000000 --- a/test/CodeGen/X86/test-pic-4.ll +++ /dev/null @@ -1,22 +0,0 @@ -; RUN: llvm-as < %s | \ -; RUN: llc -mtriple=i686-pc-linux-gnu -relocation-model=pic -o %t -f -; RUN: grep _GLOBAL_OFFSET_TABLE_ %t -; RUN: grep piclabel %t | count 3 -; RUN: grep PLT %t | count 1 -; RUN: grep GOT %t | count 1 -; RUN: not grep GOTOFF %t - -@pfoo = external global void(...)* - -define void @bar() { -entry: - %tmp = call void(...)*(...)* @afoo() - store void(...)* %tmp, void(...)** @pfoo - %tmp1 = load void(...)** @pfoo - call void(...)* %tmp1() - br label %return -return: - ret void -} - -declare void(...)* @afoo(...) diff --git a/test/CodeGen/X86/test-pic-5.ll b/test/CodeGen/X86/test-pic-5.ll deleted file mode 100644 index 3f7e16934db..00000000000 --- a/test/CodeGen/X86/test-pic-5.ll +++ /dev/null @@ -1,14 +0,0 @@ -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic \ -; RUN: -o %t -f -; RUN: grep _GLOBAL_OFFSET_TABLE_ %t -; RUN: grep piclabel %t | count 3 -; RUN: grep PLT %t | count 1 - -@ptr = external global i32* - -define void @foo() { -entry: - %ptr = malloc i32, i32 10 - ret void -} - diff --git a/test/CodeGen/X86/test-pic-6.ll b/test/CodeGen/X86/test-pic-6.ll deleted file mode 100644 index d55da1f4c6a..00000000000 --- a/test/CodeGen/X86/test-pic-6.ll +++ /dev/null @@ -1,18 +0,0 @@ -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic \ -; RUN: -o %t -f -; RUN: grep _GLOBAL_OFFSET_TABLE_ %t -; RUN: grep piclabel %t | count 3 -; RUN: grep GOT %t | count 3 - -@ptr = global i32* null -@dst = global i32 0 -@src = global i32 0 - -define void @foo() { -entry: - store i32* @dst, i32** @ptr - %tmp.s = load i32* @src - store i32 %tmp.s, i32* @dst - ret void -} - diff --git a/test/CodeGen/X86/test-pic-cpool.ll b/test/CodeGen/X86/test-pic-cpool.ll deleted file mode 100644 index cac31ed2ad7..00000000000 --- a/test/CodeGen/X86/test-pic-cpool.ll +++ /dev/null @@ -1,14 +0,0 @@ -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic \ -; RUN: -o %t -f -; RUN: grep _GLOBAL_OFFSET_TABLE_ %t -; RUN: grep piclabel %t | count 3 -; RUN: grep GOTOFF %t | count 2 -; RUN: grep CPI %t | count 4 - -define double @foo(i32 %a.u) { -entry: - %tmp = icmp eq i32 %a.u,0 - %retval = select i1 %tmp, double 4.561230e+02, double 1.234560e+02 - ret double %retval -} - diff --git a/test/CodeGen/X86/test-pic-jtbl.ll b/test/CodeGen/X86/test-pic-jtbl.ll deleted file mode 100644 index e23f7c1a9fc..00000000000 --- a/test/CodeGen/X86/test-pic-jtbl.ll +++ /dev/null @@ -1,58 +0,0 @@ -; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic \ -; RUN: -o %t -f -; RUN: grep _GLOBAL_OFFSET_TABLE_ %t -; RUN: grep piclabel %t | count 3 -; RUN: grep PLT %t | count 6 -; RUN: grep GOTOFF %t | count 14 -; RUN: grep JTI %t | count 2 - -define void @bar(i32 %n.u) { -entry: - switch i32 %n.u, label %bb12 [i32 1, label %bb i32 2, label %bb6 i32 4, label %bb7 i32 5, label %bb8 i32 6, label %bb10 i32 7, label %bb1 i32 8, label %bb3 i32 9, label %bb4 i32 10, label %bb9 i32 11, label %bb2 i32 12, label %bb5 i32 13, label %bb11 ] -bb: - tail call void(...)* @foo1() - ret void -bb1: - tail call void(...)* @foo2() - ret void -bb2: - tail call void(...)* @foo6() - ret void -bb3: - tail call void(...)* @foo3() - ret void -bb4: - tail call void(...)* @foo4() - ret void -bb5: - tail call void(...)* @foo5() - ret void -bb6: - tail call void(...)* @foo1() - ret void -bb7: - tail call void(...)* @foo2() - ret void -bb8: - tail call void(...)* @foo6() - ret void -bb9: - tail call void(...)* @foo3() - ret void -bb10: - tail call void(...)* @foo4() - ret void -bb11: - tail call void(...)* @foo5() - ret void -bb12: - tail call void(...)* @foo6() - ret void -} - -declare void @foo1(...) -declare void @foo2(...) -declare void @foo6(...) -declare void @foo3(...) -declare void @foo4(...) -declare void @foo5(...)