[llvm-commits] [poolalloc] r108215 - in /poolalloc/trunk/test/pa/clone: ./ AttrTest.ll dg.exp

Will Dietz wdietz2 at illinois.edu
Mon Jul 12 17:00:42 PDT 2010


Author: wdietz2
Date: Mon Jul 12 19:00:42 2010
New Revision: 108215

URL: http://llvm.org/viewvc/llvm-project?rev=108215&view=rev
Log:
Added "AttrTest" lit test to verify we do the right thing with attributes.
Test is simple, but does the job.

Added:
    poolalloc/trunk/test/pa/clone/
    poolalloc/trunk/test/pa/clone/AttrTest.ll
    poolalloc/trunk/test/pa/clone/dg.exp

Added: poolalloc/trunk/test/pa/clone/AttrTest.ll
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/pa/clone/AttrTest.ll?rev=108215&view=auto
==============================================================================
--- poolalloc/trunk/test/pa/clone/AttrTest.ll (added)
+++ poolalloc/trunk/test/pa/clone/AttrTest.ll Mon Jul 12 19:00:42 2010
@@ -0,0 +1,20 @@
+;This test does some very basic checking on the attribute copying of arguments
+;RUN: paopt %s -poolalloc -o %t.bc |& grep "Pool allocating.*nodes!"
+;RUN: llvm-dis %t.bc -o %t.ll
+;Make sure 'nocapture' attribute isn't copied to new PD argument
+;RUN: cat %t.ll | grep -v ".*@.*(.*nocapture.*,.*,.*)"
+;But ensure the other arguments have their original attributes
+;RUN: cat %t.ll | grep ".*@.*(.*,.*zeroext.*,.*nocapture.*)"
+target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
+target triple = "x86_64-unknown-linux-gnu"
+
+define i32 @main(i32 %argc, i8** nocapture %argv) nounwind {
+entry:
+  unreachable
+}
+
+define void @attr(i16 zeroext %IntParam, i8** nocapture %NeedsPool) {
+entry:
+  unreachable
+}
+

Added: poolalloc/trunk/test/pa/clone/dg.exp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/pa/clone/dg.exp?rev=108215&view=auto
==============================================================================
--- poolalloc/trunk/test/pa/clone/dg.exp (added)
+++ poolalloc/trunk/test/pa/clone/dg.exp Mon Jul 12 19:00:42 2010
@@ -0,0 +1,3 @@
+load_lib llvm.exp
+
+RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]]





More information about the llvm-commits mailing list