[llvm-commits] CVS: llvm/test/Feature/llvm2cpp.ll

2007-05-06 Thread Chris Lattner


Changes in directory llvm/test/Feature:

llvm2cpp.ll updated: 1.3 -> 1.4
---
Log message:

remove libbzip2 from this.  This should use llvm-config or something.


---
Diffs of the changes:  (+1 -1)

 llvm2cpp.ll |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/test/Feature/llvm2cpp.ll
diff -u llvm/test/Feature/llvm2cpp.ll:1.3 llvm/test/Feature/llvm2cpp.ll:1.4
--- llvm/test/Feature/llvm2cpp.ll:1.3   Sat Apr 14 04:43:30 2007
+++ llvm/test/Feature/llvm2cpp.ll   Sun May  6 14:21:48 2007
@@ -1,6 +1,6 @@
 ; RUN: llvm-as < %s | llvm-dis > %t1.ll
 ; RUN: llvm-as < %s | llvm2cpp -gen-program -o %t2.cpp - -f
-; RUN: %link -o %t2.exe %t2.cpp -lLLVMCore -lLLVMSupport -lLLVMbzip2 
-lLLVMSystem -lstdc++
+; RUN: %link -o %t2.exe %t2.cpp -lLLVMCore -lLLVMSupport -lLLVMSystem -lstdc++
 ; RUN: %t2.exe > %t2.ll
 ; RUN: diff %t1.ll %t2.ll
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/Feature/llvm2cpp.ll

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Feature:

llvm2cpp.ll updated: 1.2 -> 1.3
---
Log message:

Fix a missing -f caught by the new llvm.exp script.


---
Diffs of the changes:  (+1 -1)

 llvm2cpp.ll |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/test/Feature/llvm2cpp.ll
diff -u llvm/test/Feature/llvm2cpp.ll:1.2 llvm/test/Feature/llvm2cpp.ll:1.3
--- llvm/test/Feature/llvm2cpp.ll:1.2   Wed Apr 11 16:00:00 2007
+++ llvm/test/Feature/llvm2cpp.ll   Sat Apr 14 04:43:30 2007
@@ -1,5 +1,5 @@
 ; RUN: llvm-as < %s | llvm-dis > %t1.ll
-; RUN: llvm-as < %s | llvm2cpp -gen-program -o %t2.cpp -
+; RUN: llvm-as < %s | llvm2cpp -gen-program -o %t2.cpp - -f
 ; RUN: %link -o %t2.exe %t2.cpp -lLLVMCore -lLLVMSupport -lLLVMbzip2 
-lLLVMSystem -lstdc++
 ; RUN: %t2.exe > %t2.ll
 ; RUN: diff %t1.ll %t2.ll



___
llvm-commits mailing list
[EMAIL PROTECTED]
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/Feature/llvm2cpp.ll

2007-04-11 Thread Reid Spencer


Changes in directory llvm/test/Feature:

llvm2cpp.ll updated: 1.1 -> 1.2
---
Log message:

Use the new %link variable to make this test portable.


---
Diffs of the changes:  (+1 -1)

 llvm2cpp.ll |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/test/Feature/llvm2cpp.ll
diff -u llvm/test/Feature/llvm2cpp.ll:1.1 llvm/test/Feature/llvm2cpp.ll:1.2
--- llvm/test/Feature/llvm2cpp.ll:1.1   Wed Apr 11 14:54:37 2007
+++ llvm/test/Feature/llvm2cpp.ll   Wed Apr 11 16:00:00 2007
@@ -1,6 +1,6 @@
 ; RUN: llvm-as < %s | llvm-dis > %t1.ll
 ; RUN: llvm-as < %s | llvm2cpp -gen-program -o %t2.cpp -
-; RUN: gcc -g -D__STDC_LIMIT_MACROS -o %t2.exe %t2.cpp -I%I -L%L -lLLVMCore 
-lLLVMSupport -lLLVMbzip2 -lLLVMSystem -lstdc++
+; RUN: %link -o %t2.exe %t2.cpp -lLLVMCore -lLLVMSupport -lLLVMbzip2 
-lLLVMSystem -lstdc++
 ; RUN: %t2.exe > %t2.ll
 ; RUN: diff %t1.ll %t2.ll
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] CVS: llvm/test/Feature/llvm2cpp.ll

2007-04-11 Thread Reid Spencer
On Wed, 2007-04-11 at 13:43 -0700, Jeff Cohen wrote:
> Chris Lattner wrote: 
> > On Apr 11, 2007, at 12:54 PM, Reid Spencer wrote:
> > 
> >   
> > > + ; RUN: llvm-as < %s | llvm-dis > %t1.ll
> > > + ; RUN: llvm-as < %s | llvm2cpp -gen-program -o %t2.cpp -
> > > + ; RUN: gcc -g -D__STDC_LIMIT_MACROS -o %t2.exe %t2.cpp -I%I -L%L - 
> > > lLLVMCore -lLLVMSupport -lLLVMbzip2 -lLLVMSystem -lstdc++
> > > + ; RUN: %t2.exe > %t2.ll
> > > + ; RUN: diff %t1.ll %t2.ll
> > > +
> > > 
> > 
> > I don't think that hard coding 'gcc' in here is a good idea.  Can you  
> > pass down $(CC) from autoconf?
> > 
> > -Chris
> 
> Definitely isn't.  I use gcc40 on my system.

I'm fixing this, guys .. hang on.

Reid


signature.asc
Description: This is a digitally signed message part
___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] CVS: llvm/test/Feature/llvm2cpp.ll

2007-04-11 Thread Jeff Cohen

Chris Lattner wrote:

On Apr 11, 2007, at 12:54 PM, Reid Spencer wrote:

  

+ ; RUN: llvm-as < %s | llvm-dis > %t1.ll
+ ; RUN: llvm-as < %s | llvm2cpp -gen-program -o %t2.cpp -
+ ; RUN: gcc -g -D__STDC_LIMIT_MACROS -o %t2.exe %t2.cpp -I%I -L%L - 
lLLVMCore -lLLVMSupport -lLLVMbzip2 -lLLVMSystem -lstdc++

+ ; RUN: %t2.exe > %t2.ll
+ ; RUN: diff %t1.ll %t2.ll
+



I don't think that hard coding 'gcc' in here is a good idea.  Can you  
pass down $(CC) from autoconf?


-Chris


Definitely isn't.  I use gcc40 on my system.
___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] CVS: llvm/test/Feature/llvm2cpp.ll

2007-04-11 Thread Chris Lattner

On Apr 11, 2007, at 12:54 PM, Reid Spencer wrote:

> + ; RUN: llvm-as < %s | llvm-dis > %t1.ll
> + ; RUN: llvm-as < %s | llvm2cpp -gen-program -o %t2.cpp -
> + ; RUN: gcc -g -D__STDC_LIMIT_MACROS -o %t2.exe %t2.cpp -I%I -L%L - 
> lLLVMCore -lLLVMSupport -lLLVMbzip2 -lLLVMSystem -lstdc++
> + ; RUN: %t2.exe > %t2.ll
> + ; RUN: diff %t1.ll %t2.ll
> +

I don't think that hard coding 'gcc' in here is a good idea.  Can you  
pass down $(CC) from autoconf?

-Chris
___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/Feature/llvm2cpp.ll

2007-04-11 Thread Reid Spencer


Changes in directory llvm/test/Feature:

llvm2cpp.ll added (r1.1)
---
Log message:

Add a test case for testing basic IR features via llvm2cpp. This helps find
bit rot in llvm2cpp and also tests the LLVM C++ IR in ways that llvm-as
doesn't.


---
Diffs of the changes:  (+795 -0)

 llvm2cpp.ll |  795 
 1 files changed, 795 insertions(+)


Index: llvm/test/Feature/llvm2cpp.ll
diff -c /dev/null llvm/test/Feature/llvm2cpp.ll:1.1
*** /dev/null   Wed Apr 11 14:54:47 2007
--- llvm/test/Feature/llvm2cpp.ll   Wed Apr 11 14:54:37 2007
***
*** 0 
--- 1,795 
+ ; RUN: llvm-as < %s | llvm-dis > %t1.ll
+ ; RUN: llvm-as < %s | llvm2cpp -gen-program -o %t2.cpp -
+ ; RUN: gcc -g -D__STDC_LIMIT_MACROS -o %t2.exe %t2.cpp -I%I -L%L -lLLVMCore 
-lLLVMSupport -lLLVMbzip2 -lLLVMSystem -lstdc++
+ ; RUN: %t2.exe > %t2.ll
+ ; RUN: diff %t1.ll %t2.ll
+ 
+ @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
+ 
+ ; :5   ; preds = %5, %2
+   add i32 %0, %1  ; :6 [#uses=2]
+   sub i32 %6, %4  ; :7 [#uses=1]
+   icmp sle i32 %7, %3 ; :8 [#uses=1]
+   br i1 %8, label %9, label %5
+ 
+ ; :9   ; preds = %5
+   add i32 %0, %1  ; :10 [#uses=0]
+   sub i32 %6, %4  ; :11 [#uses=1]
+   icmp sle i32 %11, %3; :12 [#uses=0]
+   ret void
+ }
+ 
+ define i32 @zarro() {
+ Startup:
+   ret i32 0
+ }
+ 
+ define fastcc void @foo() {
+   ret void
+ }
+ 
+ define coldcc void @bar() {
+   call fastcc void @foo( )
+   ret void
+ }
+ 
+ define void @structret({ i8 }* sret  %P) {
+   call void @structret( { i8 }* %P sret  )
+   ret void
+ }
+ 
+ define void @foo4() {
+   ret void
+ }
+ 
+ define coldcc void @bar2() {
+   call fastcc void @foo( )
+   ret void
+ }
+ 
+ define cc42 void @bar3() {
+   invoke fastcc void @foo( )
+   to label %Ok unwind label %U
+ 
+ Ok:   ; preds = %0
+   ret void
+ 
+ U:; preds = %0
+   unwind
+ }
+ 
+ define void @bar4() {
+   call cc42 void @bar( )
+   invoke cc42 void @bar3( )
+   to label %Ok unwind label %U
+ 
+ Ok:   ; preds = %0
+   ret void
+ 
+ U:; preds = %0
+   unwind
+ }
+ ; ModuleID = 'calltest.ll'
+   %FunTy = type i32 (i32)
+ 
+ define i32 @test1000(i32 %i0) {
+   ret i32 %i0
+ }
+ 
+ define void @invoke(%FunTy* %x) {
+   %foo = call i32 %x( i32 123 )   ;  [#uses=0]
+   %foo2 = tail call i32 %x( i32 123 ) ;  [#uses=0]
+   ret void
+ }
+ 
+ define i32 @main(i32 %argc) {
+   %retval = call i32 @test1000( i32 %argc )   ;  
[#uses=2]
+   %two = add i32 %retval, %retval ;  [#uses=1]
+   %retval2 = invoke i32 @test1000( i32 %argc )
+   to label %Next unwind label %Error  ;  
[#uses=1]
+ 
+ Next: ; preds = %0
+   %two2 = add i32 %two, %retval2  ;  [#uses=1]
+   call void @invoke( %FunTy* @test1000 )
+   ret i32 %two2
+ 
+ Error:; preds = %0
+   ret i32 -1
+ }
+ ; ModuleID = 'casttest.ll'
+ 
+ define i16 @FunFunc(i64 %x, i8 %z) {
+ bb0:
+   %cast110 = sext i8 %z to i16;  [#uses=1]
+   %cast10 = trunc i64 %x to i16   ;  [#uses=1]
+   %reg109 = add i16 %cast110, %cast10 ;  [#uses=1]
+   ret i16 %reg109
+ }
+ ; ModuleID = 'cfgstructures.ll'
+ 
+ define void @irreducible(i1 %cond) {
+   br i1 %cond, label %X, label %Y
+ 
+ X:; preds = %Y, %0
+   br label %Y
+ 
+ Y:; preds = %X, %0
+   br label %X
+ }
+ 
+ define void @sharedheader(i1 %cond) {
+   br label %A
+ 
+ A:; preds = %Y, %X, %0
+   br i1 %cond, label %X, label %Y
+ 
+ X:; preds = %A
+   br label %A
+ 
+ Y:; preds = %A
+   br label %A
+ }
+ 
+ define void @nested(i1 %cond1, i1 %cond2, i1 %cond3) {
+   br label %Loop1
+ 
+ Loop1:; preds = %L2Exit, %0
+   br label %Loop2
+ 
+ Loop2:; preds = %L3Exit, %Loop1
+   br label %Loop3
+ 
+ Loop3:; preds = %Loop3, %Loop2
+   br i1 %cond3, label %Loop3, label %L3Exit
+ 
+ L3Exit:   ; preds = %Loop3
+   br i1 %cond2, label %Loop2, label %L2