From: Bill Wendling Date: Thu, 10 Jul 2008 22:35:32 +0000 (+0000) Subject: Put CPPBackend tests into their own directory and run them only if they're X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=bbcec684e38252647d987ea00b217468e943f277;p=oota-llvm.git Put CPPBackend tests into their own directory and run them only if they're supported. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53427 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGen/CPP/2007-06-16-Funcname.ll b/test/CodeGen/CPP/2007-06-16-Funcname.ll new file mode 100644 index 00000000000..75b96e6c373 --- /dev/null +++ b/test/CodeGen/CPP/2007-06-16-Funcname.ll @@ -0,0 +1,7 @@ +; RUN: llvm-as < %s | llc -march=cpp -cppfname=WAKKA | not grep makeLLVMModule +; PR1515 + +define void @foo() { + ret void +} + diff --git a/test/CodeGen/CPP/dg.exp b/test/CodeGen/CPP/dg.exp new file mode 100644 index 00000000000..3276dcc3275 --- /dev/null +++ b/test/CodeGen/CPP/dg.exp @@ -0,0 +1,5 @@ +load_lib llvm.exp + +if { [llvm_supports_target CppBackend] } { + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] +} diff --git a/test/CodeGen/CPP/llvm2cpp.ll b/test/CodeGen/CPP/llvm2cpp.ll new file mode 100644 index 00000000000..651a65bbea9 --- /dev/null +++ b/test/CodeGen/CPP/llvm2cpp.ll @@ -0,0 +1,756 @@ +; RUN: llvm-as < %s | llvm-dis > /dev/null +; RUN: llvm-as < %s | llc -march=cpp -cppgen=program -o - + +@X = global i32 4, align 16 ; [#uses=0] + +define i32* @test1012() align 32 { + %X = alloca i32, align 4 ; [#uses=1] + %Y = alloca i32, i32 42, align 16 ; [#uses=0] + %Z = alloca i32 ; [#uses=0] + ret i32* %X +} + +define i32* @test1013() { + %X = malloc i32, align 4 ; [#uses=1] + %Y = malloc i32, i32 42, align 16 ; [#uses=0] + %Z = malloc i32 ; [#uses=0] + ret i32* %X +} + +define void @void(i32, i32) { + add i32 0, 0 ; :3 [#uses=2] + sub i32 0, 4 ; :4 [#uses=2] + br label %5 + +;