[llvm-commits] CVS: llvm/test/lib/llvm.exp

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/lib:

llvm.exp added (r1.1)
---
Log message:

Initial version of a re-write of llvm-runtest that doesn't write the 
tests to a script file but executes each line individually and catches
errors on each line too.


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

 llvm.exp |  159 +++
 1 files changed, 159 insertions(+)


Index: llvm/test/lib/llvm.exp
diff -c /dev/null llvm/test/lib/llvm.exp:1.1
*** /dev/null   Sat Apr 14 04:39:38 2007
--- llvm/test/lib/llvm.exp  Sat Apr 14 04:39:28 2007
***
*** 0 
--- 1,159 
+ proc execOneLine { test outcome lineno line } {
+   set status 0
+   set resultmsg ""
+   set retval [ catch { eval exec -keepnewline -- $line } errmsg ]
+   if { $retval != 0 } {
+ set code [lindex $::errorCode 0]
+ switch "$code" {
+   CHILDSTATUS {
+ set status [lindex $::errorCode 2]
+ if { $status ne 0 } {
+   set resultmsg "$test: exit($status)\nwhile running: $line\n$errmsg"
+ }
+   }
+   CHILDKILLED {
+ set signal [lindex $::errorCode 2]
+ set resultmsg "$test: signal($signal)\nwhile running: $line\n$errmsg"
+   }
+   CHILDSUSP {
+ set signal [lindex $::errorCode 2]
+ set resultmsg "$test: suspend($signal)\nwhile running: $line\n$errmsg"
+   }
+   POSIX {
+ set posixNum [lindex $::errorCode 1]
+ set posixMsg [lindex $::errorCode 2]
+ set resultmsg "$test: posix($posixNum)\n$posixMsg\nwhile running: 
$line\n$errmsg"
+   }
+   NONE {
+   }
+   default {
+   }
+ }
+   } 
+   return $resultmsg
+ }
+ 
+ proc substitute { line test tmpFile } {
+   global srcroot objroot srcdir objdir subdir target_triplet prcontext 
+   global llvmgcc llvmgxx global llvmgcc_version llvmgccmajvers 
+   global gccpath gxxpath compile_c compile_cxx link shlibext llvmlibsdir
+ 
+   set new_line $line
+   #replace %prcontext with prcontext.tcl (Must replace before %p)
+   regsub -all {%prcontext} $new_line $prcontext new_line
+   #replace %llvmgcc with actual path to llvmgcc
+   regsub -all {%llvmgcc} $new_line "$llvmgcc -emit-llvm" new_line
+   #replace %llvmgxx with actual path to llvmg++
+   regsub -all {%llvmgxx} $new_line "$llvmgxx -emit-llvm" new_line
+   #replace %compile_c with C compilation command
+   regsub -all {%compile_c} $new_line "$compile_c" new_line
+   #replace %compile_cxx with C++ compilation command
+   regsub -all {%compile_cxx} $new_line "$compile_cxx" new_line
+   #replace %link with C++ link command
+   regsub -all {%link} $new_line "$link" new_line
+   #replace %shlibext with shared library extension
+   regsub -all {%shlibext} $new_line "$shlibext" new_line
+   #replace %llvmlibsdir with configure library directory
+   regsub -all {%llvmlibsdir} $new_line "$llvmlibsdir" new_line
+   #replace %p with path to source, 
+   regsub -all {%p} $new_line [file join $srcdir $subdir] new_line
+   #replace %s with filename
+   regsub -all {%s} $new_line $test new_line
+   #replace %t with temp filenames
+   regsub -all {%t} $new_line [file join Output $tmpFile] new_line
+   return $new_line
+ }
+ 
+ proc llvm-runtest { programs } {
+   global srcroot objroot srcdir objdir subdir target_triplet
+   set timeout 60
+ 
+   set path [file join $objdir $subdir]
+   
+   #Make Output Directory if it does not exist already
+   if { [file exists path] } {
+ cd $path
+   } else {
+ file mkdir $path
+ cd $path
+   }
+   
+   file mkdir Output
+ 
+   foreach test $programs {
+ #Should figure out best way to set the timeout
+ #set timeout 40
+ 
+ set filename [file tail $test]
+ set outcome PASS
+ set tmpFile "$filename.tmp"
+ 
+ #set hasRunline bool to check if testcase has a runline
+ set numLines 0
+ 
+ # Open the test file and start reading lines
+ set testFileId [ open $test r]
+ set runline ""
+ foreach line [split [read $testFileId] \n] {
+ 
+   #see if this is our run line
+   if {[regexp {END.[ *]$} $line match endofscript]} {
+ break
+   } elseif {[regexp {RUN: *([^\\]+)(\\)} $line match oneline suffix]} {
+ set runline "$runline$oneline "
+   } elseif {[regexp {RUN: *([^&]+)(&&)?} $line match oneline suffix]} {
+ set runline "$runline$oneline"
+ set runline [ substitute $runline $test $tmpFile ]
+ set lines($numLines) $runline
+ set numLines [expr $numLines + 1]
+ set runline ""
+   } elseif {[regexp {XFAIL:[ *](.+)} $line match targets]} {
+ set targets
+ 
+ #split up target if more then 1 specified
+ foreach target [split $targets ,] {
+   if { [regexp {\*} $target match] } {
+   set outcome XFAIL
+   } elseif { [regexp $target $target_triplet match] } {
+   set outcome XFAIL
+   } elseif { [regexp {llvmgcc(([0-9]+)|([0-9]+[.][0-9]+))} $target 
match 

[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/fold-fpcast.ll

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Feature:

fold-fpcast.ll updated: 1.2 -> 1.3
---
Log message:

Fix a missing -f that the new llvm.exp found.


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

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


Index: llvm/test/Feature/fold-fpcast.ll
diff -u llvm/test/Feature/fold-fpcast.ll:1.2 
llvm/test/Feature/fold-fpcast.ll:1.3
--- llvm/test/Feature/fold-fpcast.ll:1.2Wed Apr 11 07:04:33 2007
+++ llvm/test/Feature/fold-fpcast.llSat Apr 14 04:45:16 2007
@@ -1,4 +1,4 @@
-; RUN: llvm-upgrade < %s | llvm-as | llvm-dis -o /dev/null && 
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis -o /dev/null -f &&
 ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | not grep bitcast
 
 int %test1() {



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


[llvm-commits] CVS: llvm-www/Name.html

2007-04-14 Thread Reid Spencer


Changes in directory llvm-www:

Name.html updated: 1.12 -> 1.13
---
Log message:

Add Ralph's naming entry.


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

 Name.html |   14 +-
 1 files changed, 13 insertions(+), 1 deletion(-)


Index: llvm-www/Name.html
diff -u llvm-www/Name.html:1.12 llvm-www/Name.html:1.13
--- llvm-www/Name.html:1.12 Fri Apr 13 19:34:54 2007
+++ llvm-www/Name.html  Sat Apr 14 04:49:08 2007
@@ -247,6 +247,18 @@
 
  Christopher LambTakoaFinnish for 'to hammer' or 
'forge'.
   takoa.org is unclaimed. The image of a hammer is pretty 
iconographic.
+Ralph Corderoy
+DragomniThe cover of the Dragon book sets out to
+slay the dragon, LLVM will slay all dragons in its field.  Using
+'omni' wrongly as a suffix sounds better and keeps the "dragon"
+sound going.
+
+DragonskiSimilar theory, "dragons + ki(ller)".
+How to spell it is guessable from hearing it.  Pronounciation
+would be "dra-GONS-key" so hiding the origin a bit.  The harsh
+-ski ending sounds good.  For both
+this and the Dragomni above a "BSD daemon"-like logo of a dragon
+named, e.g. Dragonski, could be used.
   
 
 
@@ -257,6 +269,6 @@
   src="http://jigsaw.w3.org/css-validator/images/vcss"; alt="Valid CSS!">
   http://validator.w3.org/check/referer";>http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01!">
-Last modified: $Date: 2007/04/14 00:34:54 $
+Last modified: $Date: 2007/04/14 09:49:08 $
 
 



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


[llvm-commits] CVS: llvm/docs/ExceptionHandling.html

2007-04-14 Thread Duncan Sands


Changes in directory llvm/docs:

ExceptionHandling.html updated: 1.2 -> 1.3
---
Log message:

Correct typo.


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

 ExceptionHandling.html |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/docs/ExceptionHandling.html
diff -u llvm/docs/ExceptionHandling.html:1.2 
llvm/docs/ExceptionHandling.html:1.3
--- llvm/docs/ExceptionHandling.html:1.2Fri Mar 30 07:22:09 2007
+++ llvm/docs/ExceptionHandling.htmlSat Apr 14 07:30:27 2007
@@ -186,7 +186,7 @@
 
 
 
-A call within the scope of a try statement can potential raise an exception.
+A call within the scope of a try statement can potentially raise an 
exception.
 In those circumstances, the LLVM C++ front-end replaces the call with an
 invoke instruction.  Unlike a call, the invoke has two potential
 continuation points; where to continue when the call succeeds as per normal, 
and
@@ -453,7 +453,7 @@
 
   mailto:[EMAIL PROTECTED]">Chris Lattner
   http://llvm.org";>LLVM Compiler Infrastructure
-  Last modified: $Date: 2007/03/30 12:22:09 $
+  Last modified: $Date: 2007/04/14 12:30:27 $
 
 
 



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


[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

2007-04-14 Thread Anton Korobeynikov


Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAGISel.cpp updated: 1.419 -> 1.420
---
Log message:

Fix PR1325: http://llvm.org/PR1325 : Case range optimization was performed in 
the case it 
shouldn't. Also fix some "latent" bug on 64-bit platforms


---
Diffs of the changes:  (+2 -4)

 SelectionDAGISel.cpp |6 ++
 1 files changed, 2 insertions(+), 4 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.419 
llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.420
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.419Fri Apr 13 
21:26:56 2007
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp  Sat Apr 14 08:25:55 2007
@@ -1678,8 +1678,6 @@
 CaseRecVector& WorkList,
 Value* SV,
 MachineBasicBlock* 
Default){
-  return false;  // DISABLED FOR NOW: PR1325.
-  
   unsigned IntPtrBits = getSizeInBits(TLI.getPointerTy());
 
   Case& FrontCase = *CR.Range.first;
@@ -1732,7 +1730,7 @@
   // word without having to subtract minValue. In this case,
   // we can optimize away the subtraction.
   if (cast(minValue)->getSExtValue() >= 0 &&
-  cast(maxValue)->getSExtValue() <= IntPtrBits) {
+  cast(maxValue)->getSExtValue() <  IntPtrBits) {
 range = cast(maxValue)->getSExtValue();
   } else {
 lowBound = cast(minValue)->getSExtValue();
@@ -1757,7 +1755,7 @@
 uint64_t hi = cast(I->High)->getSExtValue() - lowBound;
 
 for (uint64_t j = lo; j <= hi; j++) {
-  CasesBits[i].Mask |=  1 << j;
+  CasesBits[i].Mask |=  1ULL << j;
   CasesBits[i].Bits++;
 }
   



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


[llvm-commits] CVS: llvm/test/CodeGen/Generic/2007-04-14-BitTestsBadMask.ll

2007-04-14 Thread Anton Korobeynikov


Changes in directory llvm/test/CodeGen/Generic:

2007-04-14-BitTestsBadMask.ll added (r1.1)
---
Log message:

Fix PR1325: http://llvm.org/PR1325 : Case range optimization was performed in 
the case it 
shouldn't. Also fix some "latent" bug on 64-bit platforms


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

 2007-04-14-BitTestsBadMask.ll |  160 ++
 1 files changed, 160 insertions(+)


Index: llvm/test/CodeGen/Generic/2007-04-14-BitTestsBadMask.ll
diff -c /dev/null llvm/test/CodeGen/Generic/2007-04-14-BitTestsBadMask.ll:1.1
*** /dev/null   Sat Apr 14 08:26:05 2007
--- llvm/test/CodeGen/Generic/2007-04-14-BitTestsBadMask.ll Sat Apr 14 
08:25:55 2007
***
*** 0 
--- 1,160 
+ ; RUN: llvm-as < %s | llc -march=x86 | grep '8388635'  &&
+ ; RUN: llvm-as < %s | llc -march=x86-64 | grep '4294981120'
+ ; PR 1325
+ 
+ ; ModuleID = 'bugpoint.test.bc'
+ target datalayout = 
"E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64"
+ target triple = "powerpc-apple-darwin8.8.0"
+ ;target triple = "i686-linux-gnu"
+   %struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, 
i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, 
i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], 
%struct.__sbuf, i32, i64 }
+   %struct.__sFILEX = type opaque
+   %struct.__sbuf = type { i8*, i32 }
+ @PL_rsfp = external global %struct.FILE*  ; <%struct.FILE**> 
[#uses=1]
+ @PL_bufend = external global i8*  ;  [#uses=1]
+ @PL_in_eval = external global i32 ;  [#uses=1]
+ 
+ declare fastcc void @incline(i8*)
+ 
+ define i16 @Perl_skipspace_bb60(i8* %s, i8** %s_addr.4.out) {
+ newFuncRoot:
+   %tmp138.loc = alloca i8*;  [#uses=2]
+   %s_addr.4.loc = alloca i8*  ;  [#uses=2]
+   %tmp274.loc = alloca i8*;  [#uses=2]
+   br label %bb60
+ 
+ cond_next154.UnifiedReturnBlock_crit_edge.exitStub:   ; preds = 
%codeRepl
+   store i8* %s_addr.4.reload, i8** %s_addr.4.out
+   ret i16 0
+ 
+ cond_next161.UnifiedReturnBlock_crit_edge.exitStub:   ; preds = 
%codeRepl
+   store i8* %s_addr.4.reload, i8** %s_addr.4.out
+   ret i16 1
+ 
+ cond_next167.UnifiedReturnBlock_crit_edge.exitStub:   ; preds = 
%codeRepl
+   store i8* %s_addr.4.reload, i8** %s_addr.4.out
+   ret i16 2
+ 
+ cond_false29.i.cond_true190_crit_edge.exitStub:   ; preds = 
%codeRepl
+   store i8* %s_addr.4.reload, i8** %s_addr.4.out
+   ret i16 3
+ 
+ cond_next.i.cond_true190_crit_edge.exitStub:  ; preds = %codeRepl
+   store i8* %s_addr.4.reload, i8** %s_addr.4.out
+   ret i16 4
+ 
+ cond_true19.i.cond_true190_crit_edge.exitStub:; preds = 
%codeRepl
+   store i8* %s_addr.4.reload, i8** %s_addr.4.out
+   ret i16 5
+ 
+ bb60: ; preds = %bb60.backedge, %newFuncRoot
+   %s_addr.2 = phi i8* [ %s, %newFuncRoot ], [ %s_addr.2.be, 
%bb60.backedge ]  ;  [#uses=3]
+   %tmp61 = load i8** @PL_bufend   ;  [#uses=1]
+   %tmp63 = icmp ult i8* %s_addr.2, %tmp61 ;  [#uses=1]
+   br i1 %tmp63, label %bb60.cond_next67_crit_edge, label 
%bb60.bb101_crit_edge
+ 
+ bb37: ; preds = %cond_next67.bb37_crit_edge5, 
%cond_next67.bb37_crit_edge4, %cond_next67.bb37_crit_edge3, 
%cond_next67.bb37_crit_edge2, %cond_next67.bb37_crit_edge
+   %tmp40 = icmp eq i8 %tmp69, 10  ;  [#uses=1]
+   %tmp43 = getelementptr i8* %s_addr.27.2, i32 1  ;  
[#uses=5]
+   br i1 %tmp40, label %cond_true45, label %bb37.bb60_crit_edge
+ 
+ cond_true45:  ; preds = %bb37
+   %tmp46 = volatile load i32* @PL_in_eval ;  [#uses=1]
+   %tmp47 = icmp eq i32 %tmp46, 0  ;  [#uses=1]
+   br i1 %tmp47, label %cond_true45.bb60_crit_edge, label %cond_true50
+ 
+ cond_true50:  ; preds = %cond_true45
+   %tmp51 = volatile load %struct.FILE** @PL_rsfp  ; 
<%struct.FILE*> [#uses=1]
+   %tmp52 = icmp eq %struct.FILE* %tmp51, null ;  [#uses=1]
+   br i1 %tmp52, label %cond_true55, label %cond_true50.bb60_crit_edge
+ 
+ cond_true55:  ; preds = %cond_true50
+   tail call fastcc void @incline( i8* %tmp43 )
+   br label %bb60.backedge
+ 
+ cond_next67:  ; preds = %Perl_newSV.exit.cond_next67_crit_edge, 
%cond_true148.cond_next67_crit_edge, %bb60.cond_next67_crit_edge
+   %s_addr.27.2 = phi i8* [ %s_addr.2, %bb60.cond_next67_crit_edge ], [ 
%tmp274.reload, %Perl_newSV.exit.cond_next67_crit_edge ], [ %tmp138.reload, 
%cond_true148.cond_next67_crit_edge ]  ;  [#uses=3]
+   %tmp69 = load i8* %s_addr.27.2  ;  [#uses=2]
+   switch i8 %tmp69, label %cond_next67.bb101_crit_edge [
+i8 32, label %cond_next67.bb37_crit_edge
+i8 9, label %cond_next67.bb37_crit_edge2
+ 

[llvm-commits] Handle global variables in eh_selector lowering

2007-04-14 Thread Duncan Sands
The eh_selector intrinsic wants global variables for its
extra arguments, but wasn't expecting to get... global
variables!  Only bitcasts of global variables.  Discovered
by the Ada f-e, fix attached.  Maybe it can be done more
neatly, but I don't know LLVM well enough to say.

Ciao,

Duncan.
Index: llvm.master/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
===
--- llvm.master.orig/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp	2007-04-14 14:48:28.0 +0200
+++ llvm.master/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp	2007-04-14 15:14:41.0 +0200
@@ -2606,15 +2606,20 @@
   // MachineModuleInfo.
   std::vector TyInfo;
   for (unsigned i = 3, N = I.getNumOperands(); i < N; ++i) {
-ConstantExpr *CE = dyn_cast(I.getOperand(i));
-if (CE && CE->getOpcode() == Instruction::BitCast &&
-isa(CE->getOperand(0))) {
-  TyInfo.push_back(cast(CE->getOperand(0)));
+Constant *C = cast(I.getOperand(i));
+if (isa(C)) {
+  TyInfo.push_back(cast(C));
 } else {
-  ConstantInt *CI = dyn_cast(I.getOperand(i));
-  assert(CI && CI->getZExtValue() == 0 &&
-"TypeInfo must be a global variable typeinfo or NULL");
-  TyInfo.push_back(NULL);
+  ConstantExpr *CE = dyn_cast(C);
+  if (CE && CE->getOpcode() == Instruction::BitCast &&
+  isa(CE->getOperand(0))) {
+TyInfo.push_back(cast(CE->getOperand(0)));
+  } else {
+ConstantInt *CI = dyn_cast(C);
+assert(CI && CI->getZExtValue() == 0 &&
+   "TypeInfo must be a global variable typeinfo or NULL");
+TyInfo.push_back(NULL);
+  }
 }
   }
   MMI->addCatchTypeInfo(CurMBB, TyInfo);
Index: llvm.master/test/CodeGen/Generic/2007-04-14-EHSelectorCrash.ll
===
--- /dev/null	1970-01-01 00:00:00.0 +
+++ llvm.master/test/CodeGen/Generic/2007-04-14-EHSelectorCrash.ll	2007-04-14 17:30:00.0 +0200
@@ -0,0 +1,14 @@
+; RUN: llvm-as < %s | llc -enable-eh
+
+; ModuleID = '2007-04-14-EHSelectorCrash.bc'
[EMAIL PROTECTED] = external constant i32		;  [#uses=1]
+
+define void @_ada_eh() {
+entry:
+	%eh_select = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector( i8* null, i8* bitcast (i32 (...)* @__gnat_eh_personality to i8*), i32* @__gnat_others_value )		;  [#uses=0]
+	ret void
+}
+
+declare i32 @llvm.eh.selector(i8*, i8*, ...)
+
+declare i32 @__gnat_eh_personality(...)
___
llvm-commits mailing list
[EMAIL PROTECTED]
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/Scripts/ignore

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Scripts:

ignore added (r1.1)
---
Log message:

Add a script to run a command but ignore its return code. This script 
always returns 0. This is useful with the llvm.exp based dejagnu testing
when a test wants to check the error output of tool invocation that 
returns non-zero. Since every command is checked with llvm.exp, there needs
to be a way to prevent that checking and this script is it.


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

 ignore |   10 ++
 1 files changed, 10 insertions(+)


Index: llvm/test/Scripts/ignore
diff -c /dev/null llvm/test/Scripts/ignore:1.1
*** /dev/null   Sat Apr 14 11:14:18 2007
--- llvm/test/Scripts/ignoreSat Apr 14 11:14:08 2007
***
*** 0 
--- 1,10 
+ #!/bin/sh
+ #
+ # Program: ignore
+ #
+ # Synopsis: Ignore the result code of the command and always return 0
+ #
+ # Syntax:   ignore command 
+ 
+ "$@" || exit 0 && exit 0
+ exit 0



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


[llvm-commits] CVS: llvm/test/Integer/fold-fpcast_bt.ll

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Integer:

fold-fpcast_bt.ll updated: 1.2 -> 1.3
---
Log message:

FIx this test, thanks to llvm.exp


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

 fold-fpcast_bt.ll |   20 ++--
 1 files changed, 10 insertions(+), 10 deletions(-)


Index: llvm/test/Integer/fold-fpcast_bt.ll
diff -u llvm/test/Integer/fold-fpcast_bt.ll:1.2 
llvm/test/Integer/fold-fpcast_bt.ll:1.3
--- llvm/test/Integer/fold-fpcast_bt.ll:1.2 Fri Jan 19 08:30:59 2007
+++ llvm/test/Integer/fold-fpcast_bt.ll Sat Apr 14 11:19:26 2007
@@ -1,33 +1,33 @@
 ; RUN: llvm-as < %s | llvm-dis | not grep bitcast
 
-define i60 %test1() {
+define i60 @test1() {
ret i60 fptoui(float 3.7 to i60)
 }
 
-define float %test2() {
+define float @test2() {
   ret float uitofp(i60 17 to float)
 }
 
-define i64 %test3() {
+define i64 @test3() {
   ret i64 bitcast (double 3.1415926 to i64)
 }
 
-define double %test4() {
+define double @test4() {
   ret double bitcast (i64 42 to double)
 }
 
-define i30 %test5() {
+define i30 @test5() {
   ret i30 fptoui(float 3.7 to i30)
 }
 
-define float %test6() {
+define float @test6() {
   ret float uitofp(i30 17 to float)
 }
 
-define i6 %test7() {
-  ret i6 bitcast (double 3.1415926 to i6)
+define i64 @test7() {
+  ret i64 bitcast (double 3.1415926 to i64)
 }
 
-define double %test8() {
-  ret double bitcast (i9 42 to double)
+define double @test8() {
+  ret double bitcast (i64 42 to double)
 }



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


[llvm-commits] CVS: llvm/test/Feature/dg.exp globalredefinition2.ll globalredefinition3.ll packed_struct.ll

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Feature:

dg.exp updated: 1.6 -> 1.7
globalredefinition2.ll updated: 1.2 -> 1.3
globalredefinition3.ll updated: 1.3 -> 1.4
packed_struct.ll updated: 1.6 -> 1.7
---
Log message:

For PR1319: http://llvm.org/PR1319 :
Changes necessary for conversion of this directory to run the tests
under the llvm.exp version of llvm_runtest


---
Diffs of the changes:  (+8 -9)

 dg.exp |2 +-
 globalredefinition2.ll |2 +-
 globalredefinition3.ll |6 ++
 packed_struct.ll   |7 ---
 4 files changed, 8 insertions(+), 9 deletions(-)


Index: llvm/test/Feature/dg.exp
diff -u llvm/test/Feature/dg.exp:1.6 llvm/test/Feature/dg.exp:1.7
--- llvm/test/Feature/dg.exp:1.6Wed Apr 11 14:56:58 2007
+++ llvm/test/Feature/dg.expSat Apr 14 11:40:08 2007
@@ -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}]]


Index: llvm/test/Feature/globalredefinition2.ll
diff -u llvm/test/Feature/globalredefinition2.ll:1.2 
llvm/test/Feature/globalredefinition2.ll:1.3
--- llvm/test/Feature/globalredefinition2.ll:1.2Fri Jan 26 02:25:06 2007
+++ llvm/test/Feature/globalredefinition2.llSat Apr 14 11:40:08 2007
@@ -1,5 +1,5 @@
 ; Test that redefinitions of globals produces an error in llvm-upgrade
-; RUN: llvm-upgrade < %s -o /dev/null -f 2>&1 | \
+; RUN: llvm-upgrade < %s -o /dev/null -f |& \
 ; RUN:   grep "Renaming global variable 'B' to.*linkage errors"
 
 %B = global int 7


Index: llvm/test/Feature/globalredefinition3.ll
diff -u llvm/test/Feature/globalredefinition3.ll:1.3 
llvm/test/Feature/globalredefinition3.ll:1.4
--- llvm/test/Feature/globalredefinition3.ll:1.3Fri Jan 26 02:25:06 2007
+++ llvm/test/Feature/globalredefinition3.llSat Apr 14 11:40:08 2007
@@ -1,8 +1,6 @@
-; When PR1067 is fixed, this should not be XFAIL any more.
-; RUN: llvm-as < %s -o /dev/null -f 2>&1 | \
+; RUN: ignore llvm-as < %s -o /dev/null -f |& \
 ; RUN:   grep "Redefinition of global variable named 'B'"
-
-; Test forward references and redefinitions of globals
+; END.
 
 @B = global i32 7
 @B = global i32 7


Index: llvm/test/Feature/packed_struct.ll
diff -u llvm/test/Feature/packed_struct.ll:1.6 
llvm/test/Feature/packed_struct.ll:1.7
--- llvm/test/Feature/packed_struct.ll:1.6  Tue Mar 27 21:38:26 2007
+++ llvm/test/Feature/packed_struct.ll  Sat Apr 14 11:40:08 2007
@@ -1,8 +1,9 @@
 ; RUN: llvm-as < %s | llvm-dis > %t1.ll
 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
-; RUN: diff %t1.ll %t2.ll &&
-; RUN: not grep cast %t2.ll &&
-; RUN: grep "<{" %t2.ll
+; RUN: diff %t1.ll %t2.ll
+; RUN: not grep cast %t2.ll
+; RUN: grep '\<{' %t2.ll
+; END.
 
 %struct.anon = type <{ i8, i32, i32, i32 }>
 @foos = external global %struct.anon 



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


[llvm-commits] CVS: llvm/test/lib/llvm.exp

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/lib:

llvm.exp updated: 1.1 -> 1.2
---
Log message:

Add the line number where the script failed to the error output.


---
Diffs of the changes:  (+6 -4)

 llvm.exp |   10 ++
 1 files changed, 6 insertions(+), 4 deletions(-)


Index: llvm/test/lib/llvm.exp
diff -u llvm/test/lib/llvm.exp:1.1 llvm/test/lib/llvm.exp:1.2
--- llvm/test/lib/llvm.exp:1.1  Sat Apr 14 04:39:28 2007
+++ llvm/test/lib/llvm.exp  Sat Apr 14 11:41:39 2007
@@ -4,25 +4,27 @@
   set retval [ catch { eval exec -keepnewline -- $line } errmsg ]
   if { $retval != 0 } {
 set code [lindex $::errorCode 0]
+set lineno [expr $lineno + 1]
+set errmsg " at RUN: line $lineno\nwhile running: $line\n$errmsg"
 switch "$code" {
   CHILDSTATUS {
 set status [lindex $::errorCode 2]
 if { $status ne 0 } {
-  set resultmsg "$test: exit($status)\nwhile running: $line\n$errmsg"
+  set resultmsg "$test: exit($status)$errmsg"
 }
   }
   CHILDKILLED {
 set signal [lindex $::errorCode 2]
-set resultmsg "$test: signal($signal)\nwhile running: $line\n$errmsg"
+set resultmsg "$test: signal($signal)$errmsg"
   }
   CHILDSUSP {
 set signal [lindex $::errorCode 2]
-set resultmsg "$test: suspend($signal)\nwhile running: $line\n$errmsg"
+set resultmsg "$test: suspend($signal)$errmsg"
   }
   POSIX {
 set posixNum [lindex $::errorCode 1]
 set posixMsg [lindex $::errorCode 2]
-set resultmsg "$test: posix($posixNum)\n$posixMsg\nwhile running: 
$line\n$errmsg"
+set resultmsg "$test: posix($posixNum,$posixMsg)$errmsg"
   }
   NONE {
   }



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


[llvm-commits] CVS: llvm/test/Integer/2007-01-19-TruncSext.ll dg.exp packed_struct_bt.ll

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Integer:

2007-01-19-TruncSext.ll updated: 1.3 -> 1.4
dg.exp updated: 1.2 -> 1.3
packed_struct_bt.ll updated: 1.3 -> 1.4
---
Log message:

For PR1319: http://llvm.org/PR1319 :
Changes necessary to run this with the "llvm.exp" version of llvm_runtest.


---
Diffs of the changes:  (+6 -5)

 2007-01-19-TruncSext.ll |2 +-
 dg.exp  |2 +-
 packed_struct_bt.ll |7 ---
 3 files changed, 6 insertions(+), 5 deletions(-)


Index: llvm/test/Integer/2007-01-19-TruncSext.ll
diff -u llvm/test/Integer/2007-01-19-TruncSext.ll:1.3 
llvm/test/Integer/2007-01-19-TruncSext.ll:1.4
--- llvm/test/Integer/2007-01-19-TruncSext.ll:1.3   Tue Jan 30 10:16:01 2007
+++ llvm/test/Integer/2007-01-19-TruncSext.ll   Sat Apr 14 11:48:55 2007
@@ -24,6 +24,6 @@
   %result = sext i17 %X to i32
   %fmt = getelementptr [4 x i8]* @FORMAT, i32 0, i32 0
   call i32 (i8*,...)* @printf(i8* %fmt, i32 %result)
-  ret i32 %result
+  ret i32 0
 }
 


Index: llvm/test/Integer/dg.exp
diff -u llvm/test/Integer/dg.exp:1.2 llvm/test/Integer/dg.exp:1.3
--- llvm/test/Integer/dg.exp:1.2Wed Apr 11 14:56:58 2007
+++ llvm/test/Integer/dg.expSat Apr 14 11:48:55 2007
@@ -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}]]


Index: llvm/test/Integer/packed_struct_bt.ll
diff -u llvm/test/Integer/packed_struct_bt.ll:1.3 
llvm/test/Integer/packed_struct_bt.ll:1.4
--- llvm/test/Integer/packed_struct_bt.ll:1.3   Tue Mar 27 21:38:26 2007
+++ llvm/test/Integer/packed_struct_bt.ll   Sat Apr 14 11:48:55 2007
@@ -1,8 +1,9 @@
 ; RUN: llvm-as < %s | llvm-dis > %t1.ll
 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
-; RUN: diff %t1.ll %t2.ll &&
-; RUN: not grep cast %t2.ll &&
-; RUN: grep "<{" %t2.ll
+; RUN: diff %t1.ll %t2.ll
+; RUN: not grep cast %t2.ll
+; RUN: grep '\<{' %t2.ll
+; END.
 
 %struct.anon = type <{ i8, i35, i35, i35 }>
 @foos = external global %struct.anon 



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


[llvm-commits] CVS: llvm-www/Name.html

2007-04-14 Thread Reid Spencer


Changes in directory llvm-www:

Name.html updated: 1.13 -> 1.14
---
Log message:

Add Gabor's entry.


---
Diffs of the changes:  (+7 -2)

 Name.html |9 +++--
 1 files changed, 7 insertions(+), 2 deletions(-)


Index: llvm-www/Name.html
diff -u llvm-www/Name.html:1.13 llvm-www/Name.html:1.14
--- llvm-www/Name.html:1.13 Sat Apr 14 04:49:08 2007
+++ llvm-www/Name.html  Sat Apr 14 11:50:07 2007
@@ -171,12 +171,17 @@
   Often refers to diamonds, but historically can mean
 any hard, "unbreakable" stone, metal or other substance.
 
-Gabor GreifOtimoIt is a Portuguese word,
+Gabor GreifOtimoIt is a Portuguese 
word,
 meaning optimal, perfect.  It is also different enough from plain 
English words
 to give a distinguished feel :-) and catch the eyes.  The domains 
 otimo.org and otimo.info are both available.  Last, but not least 
 it is a boon to the several LLVM developers of Portuguese
 tongue.
+http://en.wikipedia.org/wiki/Lepton#Etymology";>LeptonLoosely
+  meaning light (featherweight) in Greek.  It is used in particle physics 
to refer to
+  very light particles (electrons, muons).
+  For me it also has the connotations of fastness and restlessness (in the 
LLVM sense
+  of post-compile optimization).
 Owen AndersonWarloc
  http://en.wikipedia.org/wiki/Warlock";>Warlock
It can be thought 
@@ -269,6 +274,6 @@
   src="http://jigsaw.w3.org/css-validator/images/vcss"; alt="Valid CSS!">
   http://validator.w3.org/check/referer";>http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01!">
-Last modified: $Date: 2007/04/14 09:49:08 $
+Last modified: $Date: 2007/04/14 16:50:07 $
 
 



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


[llvm-commits] CVS: llvm/lib/Transforms/IPO/ConstantMerge.cpp

2007-04-14 Thread Jeff Cohen


Changes in directory llvm/lib/Transforms/IPO:

ConstantMerge.cpp updated: 1.36 -> 1.37
---
Log message:

Fix recent regression that broke several llvm-tests.

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

 ConstantMerge.cpp |2 ++
 1 files changed, 2 insertions(+)


Index: llvm/lib/Transforms/IPO/ConstantMerge.cpp
diff -u llvm/lib/Transforms/IPO/ConstantMerge.cpp:1.36 
llvm/lib/Transforms/IPO/ConstantMerge.cpp:1.37
--- llvm/lib/Transforms/IPO/ConstantMerge.cpp:1.36  Fri Apr 13 20:11:54 2007
+++ llvm/lib/Transforms/IPO/ConstantMerge.cpp   Sat Apr 14 11:55:19 2007
@@ -66,6 +66,8 @@
   GV->removeDeadConstantUsers();
   if (GV->use_empty() && GV->hasInternalLinkage()) {
 (GV++)->eraseFromParent();
+if (GV == E)
+  break;
   }
   
   // Only process constants with initializers.



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


[llvm-commits] CVS: llvm/test/Integer/2007-01-19-TruncSext.ll

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Integer:

2007-01-19-TruncSext.ll updated: 1.4 -> 1.5
---
Log message:

No need to quote things, shell isn't interpreting any more.


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

 2007-01-19-TruncSext.ll |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/test/Integer/2007-01-19-TruncSext.ll
diff -u llvm/test/Integer/2007-01-19-TruncSext.ll:1.4 
llvm/test/Integer/2007-01-19-TruncSext.ll:1.5
--- llvm/test/Integer/2007-01-19-TruncSext.ll:1.4   Sat Apr 14 11:48:55 2007
+++ llvm/test/Integer/2007-01-19-TruncSext.ll   Sat Apr 14 12:12:21 2007
@@ -1,7 +1,7 @@
 ; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
 ; RUN: diff %t1.ll %t2.ll
-; RUN: llvm-as < %s | lli --force-interpreter=true | grep -- '-255'
+; RUN: llvm-as < %s | lli --force-interpreter=true %t3.bc | grep -- -255
 
 @ARRAY   = global [ 20 x i17 ] zeroinitializer
 @FORMAT  = constant [ 4 x i8 ] c"%d\0A\00"



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


[llvm-commits] CVS: llvm/lib/Transforms/IPO/ConstantMerge.cpp

2007-04-14 Thread Jeff Cohen


Changes in directory llvm/lib/Transforms/IPO:

ConstantMerge.cpp updated: 1.37 -> 1.38
---
Log message:

An even better fix.

---
Diffs of the changes:  (+2 -3)

 ConstantMerge.cpp |5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)


Index: llvm/lib/Transforms/IPO/ConstantMerge.cpp
diff -u llvm/lib/Transforms/IPO/ConstantMerge.cpp:1.37 
llvm/lib/Transforms/IPO/ConstantMerge.cpp:1.38
--- llvm/lib/Transforms/IPO/ConstantMerge.cpp:1.37  Sat Apr 14 11:55:19 2007
+++ llvm/lib/Transforms/IPO/ConstantMerge.cpp   Sat Apr 14 12:18:29 2007
@@ -65,9 +65,8 @@
   // If this GV is dead, remove it.
   GV->removeDeadConstantUsers();
   if (GV->use_empty() && GV->hasInternalLinkage()) {
-(GV++)->eraseFromParent();
-if (GV == E)
-  break;
+GV->eraseFromParent();
+continue;
   }
   
   // Only process constants with initializers.



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


Re: [llvm-commits] Handle global variables in eh_selector lowering

2007-04-14 Thread Duncan Sands
How about this instead?

Duncan.
Index: llvm.master/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
===
--- llvm.master.orig/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp	2007-04-14 17:37:08.0 +0200
+++ llvm.master/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp	2007-04-14 19:25:31.0 +0200
@@ -2604,14 +2604,19 @@
   // MachineModuleInfo.
   std::vector TyInfo;
   for (unsigned i = 3, N = I.getNumOperands(); i < N; ++i) {
-ConstantExpr *CE = dyn_cast(I.getOperand(i));
-if (CE && CE->getOpcode() == Instruction::BitCast &&
-isa(CE->getOperand(0))) {
+Constant *C = cast(I.getOperand(i));
+if (isa(C)) {
+  TyInfo.push_back(cast(C));
+} else if (isa(C)) {
+  ConstantExpr *CE = cast(C);
+  assert(CE->getOpcode() == Instruction::BitCast &&
+ isa(CE->getOperand(0))
+ && "TypeInfo must be a global variable or NULL");
   TyInfo.push_back(cast(CE->getOperand(0)));
 } else {
-  ConstantInt *CI = dyn_cast(I.getOperand(i));
-  assert(CI && CI->getZExtValue() == 0 &&
-"TypeInfo must be a global variable typeinfo or NULL");
+  ConstantInt *CI = dyn_cast(C);
+  assert(CI && CI->isNullValue() &&
+ "TypeInfo must be a global variable or NULL");
   TyInfo.push_back(NULL);
 }
   }
___
llvm-commits mailing list
[EMAIL PROTECTED]
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/lib/llvm.exp

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/lib:

llvm.exp updated: 1.2 -> 1.3
---
Log message:

Print full errorInfo when a failure occurs.


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

 llvm.exp |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/test/lib/llvm.exp
diff -u llvm/test/lib/llvm.exp:1.2 llvm/test/lib/llvm.exp:1.3
--- llvm/test/lib/llvm.exp:1.2  Sat Apr 14 11:41:39 2007
+++ llvm/test/lib/llvm.exp  Sat Apr 14 12:36:20 2007
@@ -5,7 +5,7 @@
   if { $retval != 0 } {
 set code [lindex $::errorCode 0]
 set lineno [expr $lineno + 1]
-set errmsg " at RUN: line $lineno\nwhile running: $line\n$errmsg"
+set errmsg " at RUN: line $lineno\n$::errorInfo\n$errmsg"
 switch "$code" {
   CHILDSTATUS {
 set status [lindex $::errorCode 2]



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


[llvm-commits] CVS: llvm/test/Integer/2007-01-19-TruncSext.ll

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Integer:

2007-01-19-TruncSext.ll updated: 1.5 -> 1.6
---
Log message:

Don't try to interpret a fictitious file.


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

 2007-01-19-TruncSext.ll |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/test/Integer/2007-01-19-TruncSext.ll
diff -u llvm/test/Integer/2007-01-19-TruncSext.ll:1.5 
llvm/test/Integer/2007-01-19-TruncSext.ll:1.6
--- llvm/test/Integer/2007-01-19-TruncSext.ll:1.5   Sat Apr 14 12:12:21 2007
+++ llvm/test/Integer/2007-01-19-TruncSext.ll   Sat Apr 14 12:41:12 2007
@@ -1,7 +1,7 @@
 ; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
 ; RUN: diff %t1.ll %t2.ll
-; RUN: llvm-as < %s | lli --force-interpreter=true %t3.bc | grep -- -255
+; RUN: llvm-as < %s | lli --force-interpreter=true | grep -- -255
 
 @ARRAY   = global [ 20 x i17 ] zeroinitializer
 @FORMAT  = constant [ 4 x i8 ] c"%d\0A\00"



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


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

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Feature:

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

Simplify this test and correct redirection for Tcl exec.


---
Diffs of the changes:  (+2 -3)

 load_module.ll |5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)


Index: llvm/test/Feature/load_module.ll
diff -u llvm/test/Feature/load_module.ll:1.3 
llvm/test/Feature/load_module.ll:1.4
--- llvm/test/Feature/load_module.ll:1.3Wed Apr 11 20:12:54 2007
+++ llvm/test/Feature/load_module.llSat Apr 14 12:49:06 2007
@@ -1,7 +1,6 @@
 ; PR1318
-; RUN: llvm-as < %s > %t.bc &&
-; RUN: opt -load=%llvmlibsdir/LLVMHello%shlibext -hello \
-; RUN:   -disable-output %t.bc 2>&1 | grep Hello
+; RUN: llvm-as < %s | opt -load=%llvmlibsdir/LLVMHello%shlibext -hello \
+; RUN:   -disable-output - |& grep Hello
 
 @junk = global i32 0
 



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


[llvm-commits] CVS: llvm/lib/Transforms/IPO/ConstantMerge.cpp

2007-04-14 Thread Chris Lattner


Changes in directory llvm/lib/Transforms/IPO:

ConstantMerge.cpp updated: 1.38 -> 1.39
---
Log message:

avoid iterator invalidation.


---
Diffs of the changes:  (+4 -2)

 ConstantMerge.cpp |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)


Index: llvm/lib/Transforms/IPO/ConstantMerge.cpp
diff -u llvm/lib/Transforms/IPO/ConstantMerge.cpp:1.38 
llvm/lib/Transforms/IPO/ConstantMerge.cpp:1.39
--- llvm/lib/Transforms/IPO/ConstantMerge.cpp:1.38  Sat Apr 14 12:18:29 2007
+++ llvm/lib/Transforms/IPO/ConstantMerge.cpp   Sat Apr 14 13:06:52 2007
@@ -60,8 +60,10 @@
 // because doing so may cause initializers of other globals to be 
rewritten,
 // invalidating the Constant* pointers in CMap.
 //
-for (Module::global_iterator GV = M.global_begin(), E = M.global_end();
- GV != E; ++GV) {
+for (Module::global_iterator GVI = M.global_begin(), E = M.global_end();
+ GVI != E; ) {
+  GlobalVariable *GV = GVI++;
+  
   // If this GV is dead, remove it.
   GV->removeDeadConstantUsers();
   if (GV->use_empty() && GV->hasInternalLinkage()) {



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


[llvm-commits] CVS: llvm/test/Transforms/InstCombine/apint-binop-cast.ll

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Transforms/InstCombine:

apint-binop-cast.ll updated: 1.1 -> 1.2
---
Log message:

Fix an "already-upgraded" test that llvm.exp found.


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

 apint-binop-cast.ll |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/test/Transforms/InstCombine/apint-binop-cast.ll
diff -u llvm/test/Transforms/InstCombine/apint-binop-cast.ll:1.1 
llvm/test/Transforms/InstCombine/apint-binop-cast.ll:1.2
--- llvm/test/Transforms/InstCombine/apint-binop-cast.ll:1.1Fri Mar 23 
15:48:33 2007
+++ llvm/test/Transforms/InstCombine/apint-binop-cast.llSat Apr 14 
13:26:02 2007
@@ -1,4 +1,4 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | notcast
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | notcast
 
 define i47 @testAdd(i31 %X, i31 %Y) {
%tmp = add i31 %X, %Y



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


[llvm-commits] CVS: llvm/test/Transforms/InstCombine/apint-div1.ll

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Transforms/InstCombine:

apint-div1.ll updated: 1.2 -> 1.3
---
Log message:

Fix a syntax error that llvm.exp found.


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

 apint-div1.ll |3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)


Index: llvm/test/Transforms/InstCombine/apint-div1.ll
diff -u llvm/test/Transforms/InstCombine/apint-div1.ll:1.2 
llvm/test/Transforms/InstCombine/apint-div1.ll:1.3
--- llvm/test/Transforms/InstCombine/apint-div1.ll:1.2  Tue Mar 27 21:38:26 2007
+++ llvm/test/Transforms/InstCombine/apint-div1.ll  Sat Apr 14 13:28:16 2007
@@ -1,7 +1,6 @@
 ; This test makes sure that div instructions are properly eliminated.
 ; This test is for Integer BitWidth < 64 && BitWidth % 2 != 0.
 ;
-
 ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep div
 
 
@@ -17,7 +16,7 @@
 }
 
 define i59 @test3(i59 %X, bool %C) {
-%V = select bool %C, i59 1024, i59 4096
+%V = select i1 %C, i59 1024, i59 4096
 %R = udiv i59 %X, %V
 ret i59 %R
 }



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


[llvm-commits] CVS: llvm/test/Transforms/InstCombine/apint-div1.ll apint-div2.ll

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Transforms/InstCombine:

apint-div1.ll updated: 1.3 -> 1.4
apint-div2.ll updated: 1.2 -> 1.3
---
Log message:

bool -> i1 (found by llvm.exp)


---
Diffs of the changes:  (+3 -4)

 apint-div1.ll |2 +-
 apint-div2.ll |5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)


Index: llvm/test/Transforms/InstCombine/apint-div1.ll
diff -u llvm/test/Transforms/InstCombine/apint-div1.ll:1.3 
llvm/test/Transforms/InstCombine/apint-div1.ll:1.4
--- llvm/test/Transforms/InstCombine/apint-div1.ll:1.3  Sat Apr 14 13:28:16 2007
+++ llvm/test/Transforms/InstCombine/apint-div1.ll  Sat Apr 14 13:30:06 2007
@@ -15,7 +15,7 @@
 ret i49 %Y
 }
 
-define i59 @test3(i59 %X, bool %C) {
+define i59 @test3(i59 %X, i1 %C) {
 %V = select i1 %C, i59 1024, i59 4096
 %R = udiv i59 %X, %V
 ret i59 %R


Index: llvm/test/Transforms/InstCombine/apint-div2.ll
diff -u llvm/test/Transforms/InstCombine/apint-div2.ll:1.2 
llvm/test/Transforms/InstCombine/apint-div2.ll:1.3
--- llvm/test/Transforms/InstCombine/apint-div2.ll:1.2  Tue Mar 27 21:38:26 2007
+++ llvm/test/Transforms/InstCombine/apint-div2.ll  Sat Apr 14 13:30:06 2007
@@ -1,7 +1,6 @@
 ; This test makes sure that div instructions are properly eliminated.
 ; This test is for Integer BitWidth >= 64 && BitWidth <= 1024.
 ;
-
 ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep div
 
 
@@ -16,8 +15,8 @@
 ret i499 %Y
 }
 
-define i599 @test3(i599 %X, bool %C) {
-%V = select bool %C, i599 70368744177664, i599 4096
+define i599 @test3(i599 %X, i1 %C) {
+%V = select i1 %C, i599 70368744177664, i599 4096
 %R = udiv i599 %X, %V
 ret i599 %R
 }



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


[llvm-commits] CVS: llvm/test/Transforms/InstCombine/binop-cast.ll

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Transforms/InstCombine:

binop-cast.ll updated: 1.2 -> 1.3
---
Log message:

Fix a test test llvm.exp found.


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

 binop-cast.ll |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)


Index: llvm/test/Transforms/InstCombine/binop-cast.ll
diff -u llvm/test/Transforms/InstCombine/binop-cast.ll:1.2 
llvm/test/Transforms/InstCombine/binop-cast.ll:1.3
--- llvm/test/Transforms/InstCombine/binop-cast.ll:1.2  Fri Dec  1 22:23:09 2006
+++ llvm/test/Transforms/InstCombine/binop-cast.ll  Sat Apr 14 13:33:31 2007
@@ -1,7 +1,7 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | notcast
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | notcast
 
-uint %testAdd(int %X, int %Y) {
-   %tmp = add int %X, %Y
-   %tmp.l = sext int %tmp to uint
-   ret uint %tmp.l
+define i32 @testAdd(i32 %X, i32 %Y) {
+   %tmp = add i32 %X, %Y
+   %tmp.l = bitcast i32 %tmp to i32
+   ret i32 %tmp.l
 }



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


[llvm-commits] CVS: llvm/test/lib/llvm.exp

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/lib:

llvm.exp updated: 1.3 -> 1.4
---
Log message:

1. Don't generate redundant copy of stderr
2. Only match \ at the *end* of a line.


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

 llvm.exp |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/test/lib/llvm.exp
diff -u llvm/test/lib/llvm.exp:1.3 llvm/test/lib/llvm.exp:1.4
--- llvm/test/lib/llvm.exp:1.3  Sat Apr 14 12:36:20 2007
+++ llvm/test/lib/llvm.exp  Sat Apr 14 13:51:19 2007
@@ -5,7 +5,7 @@
   if { $retval != 0 } {
 set code [lindex $::errorCode 0]
 set lineno [expr $lineno + 1]
-set errmsg " at RUN: line $lineno\n$::errorInfo\n$errmsg"
+set errmsg " at RUN: line $lineno\n$::errorInfo"
 switch "$code" {
   CHILDSTATUS {
 set status [lindex $::errorCode 2]
@@ -101,7 +101,7 @@
   #see if this is our run line
   if {[regexp {END.[ *]$} $line match endofscript]} {
 break
-  } elseif {[regexp {RUN: *([^\\]+)(\\)} $line match oneline suffix]} {
+  } elseif {[regexp {RUN: *([^\\]+)(\\)$} $line match oneline suffix]} {
 set runline "$runline$oneline "
   } elseif {[regexp {RUN: *([^&]+)(&&)?} $line match oneline suffix]} {
 set runline "$runline$oneline"



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


[llvm-commits] CVS: llvm/test/Analysis/Andersens/dg.exp modreftest.ll

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Analysis/Andersens:

dg.exp updated: 1.4 -> 1.5
modreftest.ll updated: 1.3 -> 1.4
---
Log message:

For PR1319: http://llvm.org/PR1319 :
Convert to use new llvm.exp version of llvm_testrun


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

 dg.exp|2 +-
 modreftest.ll |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/test/Analysis/Andersens/dg.exp
diff -u llvm/test/Analysis/Andersens/dg.exp:1.4 
llvm/test/Analysis/Andersens/dg.exp:1.5
--- llvm/test/Analysis/Andersens/dg.exp:1.4 Wed Apr 11 14:56:57 2007
+++ llvm/test/Analysis/Andersens/dg.exp Sat Apr 14 14:10:21 2007
@@ -1,4 +1,4 @@
-load_lib llvm-dg.exp
+load_lib llvm.exp
 
 llvm-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
 


Index: llvm/test/Analysis/Andersens/modreftest.ll
diff -u llvm/test/Analysis/Andersens/modreftest.ll:1.3 
llvm/test/Analysis/Andersens/modreftest.ll:1.4
--- llvm/test/Analysis/Andersens/modreftest.ll:1.3  Fri Jan 12 23:06:52 2007
+++ llvm/test/Analysis/Andersens/modreftest.ll  Sat Apr 14 14:10:21 2007
@@ -1,6 +1,6 @@
 ; RUN: llvm-upgrade < %s | llvm-as | \
 ; RUN:   opt -anders-aa -load-vn -gcse -instcombine | llvm-dis | \
-; RUN:   grep 'ret i1 true'
+; RUN:   grep {ret i1 true}
 
 %G = internal global int* null
 declare int *%ext()



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


[llvm-commits] CVS: llvm/test/Analysis/BasicAA/2004-01-29-InvariantMemory.llx 2004-07-28-MustAliasbug.llx 2005-03-09-BrokenBasicAA.ll 2007-01-13-BasePointerBadNoAlias.ll dg.exp tailcall-modref.ll

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Analysis/BasicAA:

2004-01-29-InvariantMemory.llx updated: 1.1 -> 1.2
2004-07-28-MustAliasbug.llx updated: 1.3 -> 1.4
2005-03-09-BrokenBasicAA.ll updated: 1.3 -> 1.4
2007-01-13-BasePointerBadNoAlias.ll updated: 1.3 -> 1.4
dg.exp updated: 1.4 -> 1.5
tailcall-modref.ll updated: 1.3 -> 1.4
---
Log message:

Convert test cases to new llvm.exp version of llvm_runtest and fix tests
that it found to be broken.


---
Diffs of the changes:  (+13 -7)

 2004-01-29-InvariantMemory.llx  |3 ++-
 2004-07-28-MustAliasbug.llx |2 +-
 2005-03-09-BrokenBasicAA.ll |3 ++-
 2007-01-13-BasePointerBadNoAlias.ll |7 +--
 dg.exp  |2 +-
 tailcall-modref.ll  |3 ++-
 6 files changed, 13 insertions(+), 7 deletions(-)


Index: llvm/test/Analysis/BasicAA/2004-01-29-InvariantMemory.llx
diff -u llvm/test/Analysis/BasicAA/2004-01-29-InvariantMemory.llx:1.1 
llvm/test/Analysis/BasicAA/2004-01-29-InvariantMemory.llx:1.2
--- llvm/test/Analysis/BasicAA/2004-01-29-InvariantMemory.llx:1.1   Fri Jan 
30 16:18:47 2004
+++ llvm/test/Analysis/BasicAA/2004-01-29-InvariantMemory.llx   Sat Apr 14 
14:27:03 2007
@@ -1,4 +1,5 @@
-; RUN: llvm-as < %s | opt -load-vn -gcse -instcombine | llvm-dis | not grep 
load
+; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse -instcombine | \
+; RUN:llvm-dis | not grep load
 
 %X = constant [2 x int] [int 4, int 5]
 


Index: llvm/test/Analysis/BasicAA/2004-07-28-MustAliasbug.llx
diff -u llvm/test/Analysis/BasicAA/2004-07-28-MustAliasbug.llx:1.3 
llvm/test/Analysis/BasicAA/2004-07-28-MustAliasbug.llx:1.4
--- llvm/test/Analysis/BasicAA/2004-07-28-MustAliasbug.llx:1.3  Sun Dec 31 
00:01:59 2006
+++ llvm/test/Analysis/BasicAA/2004-07-28-MustAliasbug.llx  Sat Apr 14 
14:27:03 2007
@@ -1,4 +1,4 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -dse | llvm-dis | grep 'store i32 0'
+; RUN: llvm-upgrade < %s | llvm-as | opt -dse | llvm-dis | grep {store i32 0}
 
 void %test({int,int }* %P) {
%Q = getelementptr {int,int}* %P, int 1


Index: llvm/test/Analysis/BasicAA/2005-03-09-BrokenBasicAA.ll
diff -u llvm/test/Analysis/BasicAA/2005-03-09-BrokenBasicAA.ll:1.3 
llvm/test/Analysis/BasicAA/2005-03-09-BrokenBasicAA.ll:1.4
--- llvm/test/Analysis/BasicAA/2005-03-09-BrokenBasicAA.ll:1.3  Sun Dec 31 
00:01:59 2006
+++ llvm/test/Analysis/BasicAA/2005-03-09-BrokenBasicAA.ll  Sat Apr 14 
14:27:03 2007
@@ -1,4 +1,5 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine 
| llvm-dis | grep 'load i32\* %A'
+; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine 
|\
+; RUN:llvm-dis | grep {load i32\\* %A}
 
 declare double* %useit(int*)
 


Index: llvm/test/Analysis/BasicAA/2007-01-13-BasePointerBadNoAlias.ll
diff -u llvm/test/Analysis/BasicAA/2007-01-13-BasePointerBadNoAlias.ll:1.3 
llvm/test/Analysis/BasicAA/2007-01-13-BasePointerBadNoAlias.ll:1.4
--- llvm/test/Analysis/BasicAA/2007-01-13-BasePointerBadNoAlias.ll:1.3  Tue Mar 
27 21:38:26 2007
+++ llvm/test/Analysis/BasicAA/2007-01-13-BasePointerBadNoAlias.ll  Sat Apr 
14 14:27:03 2007
@@ -1,6 +1,9 @@
-; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | 
grep 'sub i32' &&
-; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | 
not grep 'ret i32 0'
 ; PR1109
+; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | \
+; RUN:   grep {sub i32}
+; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | \
+; RUN:   not grep {ret i32 0}
+; END.
 
 target datalayout = "e-p:32:32"
 target triple = "i686-apple-darwin8"


Index: llvm/test/Analysis/BasicAA/dg.exp
diff -u llvm/test/Analysis/BasicAA/dg.exp:1.4 
llvm/test/Analysis/BasicAA/dg.exp:1.5
--- llvm/test/Analysis/BasicAA/dg.exp:1.4   Wed Apr 11 14:56:57 2007
+++ llvm/test/Analysis/BasicAA/dg.exp   Sat Apr 14 14:27:03 2007
@@ -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}]]


Index: llvm/test/Analysis/BasicAA/tailcall-modref.ll
diff -u llvm/test/Analysis/BasicAA/tailcall-modref.ll:1.3 
llvm/test/Analysis/BasicAA/tailcall-modref.ll:1.4
--- llvm/test/Analysis/BasicAA/tailcall-modref.ll:1.3   Sun Dec 31 00:01:59 2006
+++ llvm/test/Analysis/BasicAA/tailcall-modref.ll   Sat Apr 14 14:27:03 2007
@@ -1,4 +1,5 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine 
| llvm-dis | grep 'ret i32 0'
+; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine 
|\
+; RUN:   llvm-dis | grep {ret i32 0}
 declare void %foo(int*)
 declare void %bar()
 



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


[llvm-commits] CVS: llvm/test/lib/llvm.exp

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/lib:

llvm.exp updated: 1.4 -> 1.5
---
Log message:

For PR1319: http://llvm.org/PR1319 :
More improvements:
1. Using ::errorInfo wasn't such a hot idea. Go back to just printing the
   offending line of code and the stderr output. This is sufficient and
   not entangled with Tcl goop.
2. Capture the problem report numbers and report them whether pass or fail.
   This helps quickly get some context when a test fails, if it has an
   associated PR number.


---
Diffs of the changes:  (+27 -6)

 llvm.exp |   33 +++--
 1 files changed, 27 insertions(+), 6 deletions(-)


Index: llvm/test/lib/llvm.exp
diff -u llvm/test/lib/llvm.exp:1.4 llvm/test/lib/llvm.exp:1.5
--- llvm/test/lib/llvm.exp:1.4  Sat Apr 14 13:51:19 2007
+++ llvm/test/lib/llvm.exp  Sat Apr 14 14:37:22 2007
@@ -1,11 +1,14 @@
-proc execOneLine { test outcome lineno line } {
+proc execOneLine { test PRS outcome lineno line } {
   set status 0
   set resultmsg ""
   set retval [ catch { eval exec -keepnewline -- $line } errmsg ]
   if { $retval != 0 } {
 set code [lindex $::errorCode 0]
 set lineno [expr $lineno + 1]
-set errmsg " at RUN: line $lineno\n$::errorInfo"
+if { $PRS != ""} {
+  set PRS " for $PRS" 
+}
+set errmsg " at line $lineno$PRS\nwhile running: $line\n$errmsg"
 switch "$code" {
   CHILDSTATUS {
 set status [lindex $::errorCode 2]
@@ -96,19 +99,34 @@
 # Open the test file and start reading lines
 set testFileId [ open $test r]
 set runline ""
+set PRNUMS ""
 foreach line [split [read $testFileId] \n] {
 
-  #see if this is our run line
+  # if its the END. line then stop parsing (optimization for big files)
   if {[regexp {END.[ *]$} $line match endofscript]} {
 break
+
+  # if the line is continued, concatente and continue the loop
   } elseif {[regexp {RUN: *([^\\]+)(\\)$} $line match oneline suffix]} {
 set runline "$runline$oneline "
+
+  # if its a terminating RUN: line then do substitution on the whole line
+  # and then save the line.
   } elseif {[regexp {RUN: *([^&]+)(&&)?} $line match oneline suffix]} {
 set runline "$runline$oneline"
 set runline [ substitute $runline $test $tmpFile ]
 set lines($numLines) $runline
 set numLines [expr $numLines + 1]
 set runline ""
+
+  # if its an PR line, save the problem report number
+  } elseif {[regexp {PR([0-9]+)} $line match prnum]} {
+if {$PRNUMS == ""} {
+  set PRNUMS $prnum
+} else {
+  set PRNUMS "$PRNUMS,$prnum"
+}
+  # if its an XFAIL line, see if we should be XFAILing or not.
   } elseif {[regexp {XFAIL:[ *](.+)} $line match targets]} {
 set targets
 
@@ -138,7 +156,7 @@
   for { set i 0 } { $i < $numLines } { set i [ expr $i + 1 ] } {
 regsub ^.*RUN:(.*) $lines($i) \1 theLine
 set theLine [subst $theLine ]
-set resultmsg [execOneLine $test $outcome $i $theLine ]
+set resultmsg [execOneLine $test $PRNUMS $outcome $i $theLine ]
 if { $resultmsg != "" } {
   if { $outcome == "XFAIL" } {
 xfail "$resultmsg"
@@ -150,10 +168,13 @@
 }
   }
   if { !$failed } {
+if {$PRNUMS != ""} {
+  set PRNUMS " for $PRNUMS"
+}
 if { $outcome == "XFAIL" } {
-  xpass "$test"
+  xpass "$test$PRNUMS"
 } else {
-  pass "$resultmsg"
+  pass "$test$PRNUMS"
 }
   }
 }



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


[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

2007-04-14 Thread Chris Lattner


Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAGISel.cpp updated: 1.420 -> 1.421
---
Log message:

disable switch lowering using shift/and.  It still breaks ppc bootstrap for
some reason.  :(  Will investigate.


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

 SelectionDAGISel.cpp |1 +
 1 files changed, 1 insertion(+)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.420 
llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.421
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.420Sat Apr 14 
08:25:55 2007
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp  Sat Apr 14 14:39:41 2007
@@ -1678,6 +1678,7 @@
 CaseRecVector& WorkList,
 Value* SV,
 MachineBasicBlock* 
Default){
+  return false;
   unsigned IntPtrBits = getSizeInBits(TLI.getPointerTy());
 
   Case& FrontCase = *CR.Range.first;



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


[llvm-commits] [126124] CEIL_DIV_EXPR performs integer division with rounding

2007-04-14 Thread clattner
Revision: 126124
Author:   clattner
Date: 2007-04-14 12:42:51 -0700 (Sat, 14 Apr 2007)

Log Message:
---
CEIL_DIV_EXPR performs integer division with rounding
towards positive infinity, thus 3 cdiv 2 = 2 while
-3 cdiv 2 = -1.  Testing is tricky, because CEIL_DIV_EXPR
is only generated in unusual circumstances, giving little
coverage, so I modified the llvm- and mainline gcc compilers
to output CEIL_DIV_EXPR for normal division, and compared
the results for all possible signed and unsigned i8 values
for the left- and right-hand sides.

Patch by Duncan Sands.

Modified Paths:
--
apple-local/branches/llvm/gcc/llvm-convert.cpp
apple-local/branches/llvm/gcc/llvm-internal.h

Modified: apple-local/branches/llvm/gcc/llvm-convert.cpp
===
--- apple-local/branches/llvm/gcc/llvm-convert.cpp  2007-04-14 18:14:58 UTC 
(rev 126123)
+++ apple-local/branches/llvm/gcc/llvm-convert.cpp  2007-04-14 19:42:51 UTC 
(rev 126124)
@@ -779,6 +779,7 @@
   Result = EmitBinOp(exp, DestLoc, Instruction::SDiv);
 break;
   case RDIV_EXPR: Result = EmitBinOp(exp, DestLoc, Instruction::FDiv); break;
+  case CEIL_DIV_EXPR: Result = EmitCEIL_DIV_EXPR(exp); break;
   case ROUND_DIV_EXPR: Result = EmitROUND_DIV_EXPR(exp); break;
   case TRUNC_MOD_EXPR: 
 if (TYPE_UNSIGNED(TREE_TYPE(exp)))
@@ -3200,6 +3201,82 @@
   return new SelectInst(SameAsRem, Rem, RemPlusRHS, "mod", CurBB);
 }
 
+Value *TreeToLLVM::EmitCEIL_DIV_EXPR(tree exp) {
+  // Notation: CEIL_DIV_EXPR <-> CDiv, TRUNC_DIV_EXPR <-> Div.
+
+  // CDiv calculates LHS/RHS by rounding up to the nearest integer.  In terms
+  // of Div this means if the values of LHS and RHS have opposite signs or if
+  // LHS is zero, then CDiv necessarily equals Div; and
+  //   LHS CDiv RHS = (LHS - Sign(RHS)) Div RHS + 1
+  // otherwise.
+
+  const Type *Ty = ConvertType(TREE_TYPE(exp));
+  Constant *Zero = ConstantInt::get(Ty, 0);
+  Constant *One = ConstantInt::get(Ty, 1);
+  Constant *MinusOne = ConstantInt::get(Ty, -1);
+
+  Value *LHS = Emit(TREE_OPERAND(exp, 0), 0);
+  Value *RHS = Emit(TREE_OPERAND(exp, 1), 0);
+
+  if (!TYPE_UNSIGNED(TREE_TYPE(exp))) {
+// In the case of signed arithmetic, we calculate CDiv as follows:
+//   LHS CDiv RHS = (LHS - Sign(RHS) * Offset) Div RHS + Offset,
+// where Offset is 1 if LHS and RHS have the same sign and LHS is
+// not zero, and 0 otherwise.
+
+// On some machines INT_MIN Div -1 traps.  You might expect a trap for
+// INT_MIN CDiv -1 too, but this implementation will not generate one.
+// Quick quiz question: what value is returned for INT_MIN CDiv -1?
+
+// Determine the signs of LHS and RHS, and whether they have the same sign.
+Value *LHSIsPositive = new ICmpInst(ICmpInst::ICMP_SGE, LHS, Zero, "tmp",
+CurBB);
+Value *RHSIsPositive = new ICmpInst(ICmpInst::ICMP_SGE, RHS, Zero, "tmp",
+CurBB);
+Value *HaveSameSign = new ICmpInst(ICmpInst::ICMP_EQ, LHSIsPositive,
+   RHSIsPositive, "tmp", CurBB);
+
+// Offset equals 1 if LHS and RHS have the same sign and LHS is not zero 
...
+Value *LHSNotZero = new ICmpInst(ICmpInst::ICMP_NE, LHS, Zero, "tmp",
+ CurBB);
+Value *OffsetOne = BinaryOperator::create(Instruction::And, HaveSameSign,
+  LHSNotZero, "tmp", CurBB);
+// ... otherwise it is 0.
+Value *Offset = new SelectInst(OffsetOne, One, Zero, "tmp", CurBB);
+
+// Calculate Sign(RHS) ...
+Value *SignRHS = new SelectInst(RHSIsPositive, One, MinusOne, "tmp", 
CurBB);
+// ... and Sign(RHS) * Offset
+Value *SignedOffset = CastToType(Instruction::SExt, OffsetOne, Ty);
+SignedOffset = BinaryOperator::create(Instruction::And, SignRHS,
+  SignedOffset, "tmp", CurBB);
+
+// Return CDiv = (LHS - Sign(RHS) * Offset) Div RHS + Offset.
+Value *CDiv = BinaryOperator::create(Instruction::Sub, LHS, SignedOffset,
+ "tmp", CurBB);
+CDiv = BinaryOperator::create(Instruction::SDiv, CDiv, RHS, "tmp", CurBB);
+return BinaryOperator::create(Instruction::Add, CDiv, Offset, "cdiv",
+  CurBB);
+  } else {
+// In the case of unsigned arithmetic, LHS and RHS necessarily have the
+// same sign, so we can use
+//   LHS CDiv RHS = (LHS - 1) Div RHS + 1
+// as long as LHS is non-zero.
+
+// Offset is 1 if LHS is non-zero, 0 otherwise.
+Value *LHSNotZero = new ICmpInst(ICmpInst::ICMP_NE, LHS, Zero, "tmp",
+ CurBB);
+Value *Offset = new SelectInst(LHSNotZero, One, Zero, "tmp", CurBB);
+
+// Return CDiv = (LHS - Offset) Div RHS + Offset.
+Value *CDiv = BinaryOperator::create(Instruction::Sub, LHS, Offset, "tmp",
+  

Re: [llvm-commits] CVS: llvm-test/SingleSource/UnitTests/tls.c Makefile

2007-04-14 Thread Chris Lattner
On Apr 11, 2007, at 11:57 AM, Lauro Ramos Venancio wrote:
> Add a TLS test.

Hi Lauro, can you please add a "Threads" subdirectory of UnitTests  
and move this testcase there?  That way we won't be linking all  
UnitTests with -lpthreads.

Thanks!

-Chris

>
> ---
> Diffs of the changes:  (+21 -0)
>
>  Makefile |1 +
>  tls.c|   20 
>  2 files changed, 21 insertions(+)
>
>
> Index: llvm-test/SingleSource/UnitTests/tls.c
> diff -c /dev/null llvm-test/SingleSource/UnitTests/tls.c:1.1
> *** /dev/null Wed Apr 11 13:56:56 2007
> --- llvm-test/SingleSource/UnitTests/tls.cWed Apr 11 13:56:46 2007
> ***
> *** 0 
> --- 1,20 
> + #include 
> + #include 
> +
> + void *f(void *a){
> +   static __thread int i = 1;
> +   i++;
> +   return (void *)i;
> + }
> +
> + int main() {
> +   pthread_t t;
> +   int ret;
> +   pthread_create(&t, NULL, f, NULL);
> +   pthread_join(t, (void **) &ret);
> +   printf("Thread 1: %d\n",ret);
> +   pthread_create(&t, NULL, f, NULL);
> +   pthread_join(t, (void **) &ret);
> +   printf("Thread 2: %d\n",ret);
> +   return 0;
> + }
>
>
> Index: llvm-test/SingleSource/UnitTests/Makefile
> diff -u llvm-test/SingleSource/UnitTests/Makefile:1.14 llvm-test/ 
> SingleSource/UnitTests/Makefile:1.15
> --- llvm-test/SingleSource/UnitTests/Makefile:1.14Tue Apr 10  
> 18:52:47 2007
> +++ llvm-test/SingleSource/UnitTests/Makefile Wed Apr 11 13:56:46 2007
> @@ -15,5 +15,6 @@
>
>  DIRS += SignlessTypes
>
> +LDFLAGS += -lpthread
>  PROGRAM_REQUIRED_TO_EXIT_OK := 1
>  include $(LEVEL)/SingleSource/Makefile.singlesrc
>
>
>
> ___
> llvm-commits mailing list
> [EMAIL PROTECTED]
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

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


[llvm-commits] CVS: llvm/test/Transforms/InstCombine/fpcast.ll

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Transforms/InstCombine:

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

This test needs to use egrep.


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

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


Index: llvm/test/Transforms/InstCombine/fpcast.ll
diff -u llvm/test/Transforms/InstCombine/fpcast.ll:1.3 
llvm/test/Transforms/InstCombine/fpcast.ll:1.4
--- llvm/test/Transforms/InstCombine/fpcast.ll:1.3  Sun Dec 31 00:01:59 2006
+++ llvm/test/Transforms/InstCombine/fpcast.ll  Sat Apr 14 15:02:51 2007
@@ -1,7 +1,7 @@
 ; Test some floating point casting cases
 ; RUN: llvm-upgrade %s -o - | llvm-as | opt -instcombine | llvm-dis | notcast
 ; RUN: llvm-upgrade %s -o - | llvm-as | opt -instcombine | llvm-dis | \
-; RUN:   grep 'ret i8 \(-1\)\|\(255\)'
+; RUN:   egrep {ret i8 \(-1\)\|\(255\)}
 
 sbyte %test1() {
 %x = fptoui float 255.0 to sbyte 



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


[llvm-commits] CVS: llvm/test/Transforms/InstCombine/memmove.ll

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Transforms/InstCombine:

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

This test should have been updated with llvm 1.7!


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

 memmove.ll |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Index: llvm/test/Transforms/InstCombine/memmove.ll
diff -u llvm/test/Transforms/InstCombine/memmove.ll:1.3 
llvm/test/Transforms/InstCombine/memmove.ll:1.4
--- llvm/test/Transforms/InstCombine/memmove.ll:1.3 Sat Apr 14 15:13:02 2007
+++ llvm/test/Transforms/InstCombine/memmove.ll Sat Apr 14 15:21:37 2007
@@ -7,17 +7,17 @@
 
 implementation
 
-declare void %llvm.memmove(sbyte*, sbyte*, uint, uint)
+declare void %llvm.memmove.i32(sbyte*, sbyte*, uint, uint)
 
 void %test1(sbyte* %A, sbyte* %B, uint %N) {
;; 0 bytes -> noop.
-   call void %llvm.memmove(sbyte* %A, sbyte* %B, uint 0, uint 1)
+   call void %llvm.memmove.i32(sbyte* %A, sbyte* %B, uint 0, uint 1)
ret void
 }
 
 void %test2(sbyte *%A, uint %N) {
;; dest can't alias source since we can't write to source!
-   call void %llvm.memmove(sbyte* %A, sbyte* getelementptr ([33 x sbyte]* 
%S, int 0, int 0), 
+   call void %llvm.memmove.i32(sbyte* %A, sbyte* getelementptr ([33 x 
sbyte]* %S, int 0, int 0), 
 uint %N, uint 1)
ret void
 }



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


[llvm-commits] CVS: llvm/docs/TestingGuide.html

2007-04-14 Thread Reid Spencer


Changes in directory llvm/docs:

TestingGuide.html updated: 1.40 -> 1.41
---
Log message:

For PR1319: http://llvm.org/PR1319 :
Rewrite much of the DejaGnu section to bring it in line with the new 
facilities in llvm.exp.


---
Diffs of the changes:  (+192 -74)

 TestingGuide.html |  266 ++
 1 files changed, 192 insertions(+), 74 deletions(-)


Index: llvm/docs/TestingGuide.html
diff -u llvm/docs/TestingGuide.html:1.40 llvm/docs/TestingGuide.html:1.41
--- llvm/docs/TestingGuide.html:1.40Thu Feb  8 11:00:55 2007
+++ llvm/docs/TestingGuide.html Sat Apr 14 16:46:15 2007
@@ -275,81 +275,199 @@
 

 DejaGNU Structure
 

-
 
-The LLVM test suite is partially driven by DejaGNU and partially
-driven by GNU Make. Specifically, the Features and Regression tests
-are all driven by DejaGNU. The llvm-test
-module is currently driven by a set of Makefiles.
-
-The DejaGNU structure is very simple, but does require some
-information to be set. This information is gathered via configure and
-is written to a file, site.exp in llvm/test. The
-llvm/test
-Makefile does this work for you.
-
-In order for DejaGNU to work, each directory of tests must have a
-dg.exp file. This file is a program written in tcl that calls
-the llvm-runtests procedure on each test file. The
-llvm-runtests procedure is defined in
-llvm/test/lib/llvm-dg.exp. Any directory that contains only
-directories does not need the dg.exp file.
-
-In order for a test to be run, it must contain information within
-the test file on how to run the test. These are called RUN
-lines. Run lines are specified in the comments of the test program
-using the keyword RUN followed by a colon, and lastly the
-commands to execute. These commands will be executed in a bash script,
-so any bash syntax is acceptable. You can specify as many RUN lines as
-necessary.  Each RUN line translates to one line in the resulting bash
-script. Below is an example of legal RUN lines in a .ll
-file:
-
-; RUN: llvm-as < %s | llvm-dis > %t1
-; RUN: llvm-dis < %s.bc-13 > %t2
-; RUN: diff %t1 %t2
-
-There are a couple patterns within a RUN line that the
-llvm-runtest procedure looks for and replaces with the appropriate
-syntax:
-
-
-%p 
-The path to the source directory. This is for locating
-any supporting files that are not generated by the test, but used by
-the test. 
-%s 
-The test file. 
-
-%t
-Temporary filename: testscript.test_filename.tmp, where
-test_filename is the name of the test file. All temporary files are
-placed in the Output directory within the directory the test is
-located. 
-
-%prcontext 
-Path to a script that performs grep -C. Use this since not all
-platforms support grep -C.
-
-%llvmgcc Full path to the llvm-gcc executable.
-%llvmgxx Full path to the llvm-g++ executable.
-
-
-There are also several scripts in the llvm/test/Scripts directory
-that you might find useful when writing RUN lines.
+  The LLVM test suite is partially driven by DejaGNU and partially driven 
by 
+  GNU Make. Specifically, the Features and Regression tests are all driven by 
+  DejaGNU. The llvm-test module is currently driven by a set of 
+  Makefiles.
+
+  The DejaGNU structure is very simple, but does require some information 
to 
+  be set. This information is gathered via configure and is written 
+  to a file, site.exp in llvm/test. The llvm/test 
+  Makefile does this work for you.
+
+  In order for DejaGNU to work, each directory of tests must have a 
+  dg.exp file. DejaGNU looks for this file to determine how to run the
+  tests. This file is just a Tcl script and it can do anything you want, but 
+  we've standardized it for the LLVM regression tests. It simply loads a Tcl 
+  library (test/lib/llvm.exp) and calls the llvm_runtests 
+  function defined in that library with a list of file names to run. The names 
+  are obtained by using Tcl's glob command.  Any directory that contains only
+  directories does not need the dg.exp file.
+
+  The llvm-runtests function lookas at each file that is passed to
+  it and gathers any lines together that match "RUN:". This are the "RUN" lines
+  that specify how the test is to be run. So, each test script must contain
+  RUN lines if it is to do anything. If there are no RUN lines, the
+  llvm-runtests function will issue an error and the test will
+  fail.
+
+  RUN lines are specified in the comments of the test program using the 
+  keyword RUN followed by a colon, and lastly the command (pipeline) 
+  to execute.  Together, these lines form the "script" that 
+  llvm-runtests executes to run the test case.  The syntax of the
+  RUN lines is similar to a shell's syntax for pipelines including I/O
+  redirection and variable substitution.  However, even though these lines 
+  may look like a shell script, they are not. RUN lines are interpreted 
+  directly by the Tcl exec command. They are never executed by a 
+  shell. Consequently the syntax differs from normal shell script syntax i

[llvm-commits] CVS: llvm/include/llvm/ADT/SmallPtrSet.h

2007-04-14 Thread Jeff Cohen


Changes in directory llvm/include/llvm/ADT:

SmallPtrSet.h updated: 1.10 -> 1.11
---
Log message:

Fix PR1329: http://llvm.org/PR1329 .

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

 SmallPtrSet.h |4 
 1 files changed, 4 insertions(+)


Index: llvm/include/llvm/ADT/SmallPtrSet.h
diff -u llvm/include/llvm/ADT/SmallPtrSet.h:1.10 
llvm/include/llvm/ADT/SmallPtrSet.h:1.11
--- llvm/include/llvm/ADT/SmallPtrSet.h:1.10Sun Apr  1 20:21:19 2007
+++ llvm/include/llvm/ADT/SmallPtrSet.h Sat Apr 14 16:50:21 2007
@@ -53,6 +53,9 @@
   unsigned NumElements;
   unsigned NumTombstones;
   void *SmallArray[1];  // Must be last ivar.
+
+  // Helper to copy construct a SmallPtrSet.
+  SmallPtrSetImpl(const SmallPtrSetImpl& that);
 public:
   SmallPtrSetImpl(unsigned SmallSize) {
 assert(SmallSize && (SmallSize & (SmallSize-1)) == 0 &&
@@ -214,6 +217,7 @@
   void *SmallArray[SmallSizePowTwo];
 public:
   SmallPtrSet() : SmallPtrSetImpl(NextPowerOfTwo::Val) {}
+  SmallPtrSet(const SmallPtrSet &that) : SmallPtrSetImpl(that) {}
   
   template
   SmallPtrSet(It I, It E)



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


[llvm-commits] CVS: llvm/lib/Support/SmallPtrSet.cpp

2007-04-14 Thread Jeff Cohen


Changes in directory llvm/lib/Support:

SmallPtrSet.cpp updated: 1.5 -> 1.6
---
Log message:

Fix PR1329: http://llvm.org/PR1329 .

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

 SmallPtrSet.cpp |   28 
 1 files changed, 28 insertions(+)


Index: llvm/lib/Support/SmallPtrSet.cpp
diff -u llvm/lib/Support/SmallPtrSet.cpp:1.5 
llvm/lib/Support/SmallPtrSet.cpp:1.6
--- llvm/lib/Support/SmallPtrSet.cpp:1.5Tue Feb  6 19:11:25 2007
+++ llvm/lib/Support/SmallPtrSet.cppSat Apr 14 16:50:21 2007
@@ -141,5 +141,33 @@
 }
 
 delete [] OldBuckets;
+NumTombstones = 0;
+  }
+}
+
+SmallPtrSetImpl::SmallPtrSetImpl(const SmallPtrSetImpl& that) {
+  NumElements = that.NumElements;
+  NumTombstones = 0;
+  if (that.isSmall()) {
+CurArraySize = that.CurArraySize;
+CurArray = &SmallArray[0];
+memcpy(CurArray, that.CurArray, sizeof(void*)*CurArraySize);
+  } else {
+CurArraySize = that.NumElements < 64 ? 128 : that.NumElements*2;
+CurArray = new void*[CurArraySize+1];
+memset(CurArray, -1, CurArraySize*sizeof(void*));
+
+// The end pointer, always valid, is set to a valid element to help the
+// iterator.
+CurArray[CurArraySize] = 0;
+
+// Copy over all valid entries.
+for (void **BucketPtr = that.CurArray, **E = that.CurArray+CurArraySize;
+ BucketPtr != E; ++BucketPtr) {
+  // Copy over the element if it is valid.
+  void *Elt = *BucketPtr;
+  if (Elt != getTombstoneMarker() && Elt != getEmptyMarker())
+*const_cast(FindBucketFor(Elt)) = Elt;
+}
   }
 }



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


[llvm-commits] CVS: llvm/lib/Transforms/Utils/LCSSA.cpp

2007-04-14 Thread Chris Lattner


Changes in directory llvm/lib/Transforms/Utils:

LCSSA.cpp updated: 1.35 -> 1.36
---
Log message:

avoid copying sets and vectors around.


---
Diffs of the changes:  (+6 -7)

 LCSSA.cpp |   13 ++---
 1 files changed, 6 insertions(+), 7 deletions(-)


Index: llvm/lib/Transforms/Utils/LCSSA.cpp
diff -u llvm/lib/Transforms/Utils/LCSSA.cpp:1.35 
llvm/lib/Transforms/Utils/LCSSA.cpp:1.36
--- llvm/lib/Transforms/Utils/LCSSA.cpp:1.35Mon Feb  5 17:32:05 2007
+++ llvm/lib/Transforms/Utils/LCSSA.cpp Sat Apr 14 17:10:17 2007
@@ -69,7 +69,8 @@
   AU.addRequired();
 }
   private:
-SetVector getLoopValuesUsedOutsideLoop(Loop *L);
+void getLoopValuesUsedOutsideLoop(Loop *L,
+  SetVector &AffectedValues);
 
 Value *GetValueForBlock(DominatorTree::Node *BB, Instruction *OrigInst,
 std::map &Phis);
@@ -110,7 +111,8 @@
   LoopBlocks.insert(LoopBlocks.end(), L->block_begin(), L->block_end());
   std::sort(LoopBlocks.begin(), LoopBlocks.end());
   
-  SetVector AffectedValues = getLoopValuesUsedOutsideLoop(L);
+  SetVector AffectedValues;
+  getLoopValuesUsedOutsideLoop(L, AffectedValues);
   
   // If no values are affected, we can save a lot of work, since we know that
   // nothing will be changed.
@@ -196,14 +198,12 @@
 
 /// getLoopValuesUsedOutsideLoop - Return any values defined in the loop that
 /// are used by instructions outside of it.
-SetVector LCSSA::getLoopValuesUsedOutsideLoop(Loop *L) {
-  
+void LCSSA::getLoopValuesUsedOutsideLoop(Loop *L,
+  SetVector &AffectedValues) 
{
   // FIXME: For large loops, we may be able to avoid a lot of use-scanning
   // by using dominance information.  In particular, if a block does not
   // dominate any of the loop exits, then none of the values defined in the
   // block could be used outside the loop.
-  
-  SetVector AffectedValues;  
   for (Loop::block_iterator BB = L->block_begin(), E = L->block_end();
BB != E; ++BB) {
 for (BasicBlock::iterator I = (*BB)->begin(), E = (*BB)->end(); I != E; 
++I)
@@ -221,7 +221,6 @@
 }
   }
   }
-  return AffectedValues;
 }
 
 /// GetValueForBlock - Get the value to use within the specified basic block.



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


[llvm-commits] CVS: llvm/test/Feature/globalredefinition2.ll globalredefinition3.ll packed_struct.ll

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Feature:

globalredefinition2.ll updated: 1.3 -> 1.4
globalredefinition3.ll updated: 1.4 -> 1.5
packed_struct.ll updated: 1.7 -> 1.8
---
Log message:

Try some alternative syntax.


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

 globalredefinition2.ll |4 ++--
 globalredefinition3.ll |4 ++--
 packed_struct.ll   |2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)


Index: llvm/test/Feature/globalredefinition2.ll
diff -u llvm/test/Feature/globalredefinition2.ll:1.3 
llvm/test/Feature/globalredefinition2.ll:1.4
--- llvm/test/Feature/globalredefinition2.ll:1.3Sat Apr 14 11:40:08 2007
+++ llvm/test/Feature/globalredefinition2.llSat Apr 14 17:27:05 2007
@@ -1,6 +1,6 @@
 ; Test that redefinitions of globals produces an error in llvm-upgrade
-; RUN: llvm-upgrade < %s -o /dev/null -f |& \
-; RUN:   grep "Renaming global variable 'B' to.*linkage errors"
+; RUN: llvm-upgrade < %s -o /dev/null -f |&  grep \
+; RUN:"Renaming global variable 'B' to.*linkage errors"
 
 %B = global int 7
 %B = global int 7


Index: llvm/test/Feature/globalredefinition3.ll
diff -u llvm/test/Feature/globalredefinition3.ll:1.4 
llvm/test/Feature/globalredefinition3.ll:1.5
--- llvm/test/Feature/globalredefinition3.ll:1.4Sat Apr 14 11:40:08 2007
+++ llvm/test/Feature/globalredefinition3.llSat Apr 14 17:27:05 2007
@@ -1,5 +1,5 @@
-; RUN: ignore llvm-as < %s -o /dev/null -f |& \
-; RUN:   grep "Redefinition of global variable named 'B'"
+; RUN: ignore llvm-as < %s -o /dev/null -f |& grep \
+; RUN:   "Redefinition of global variable named 'B'"
 ; END.
 
 @B = global i32 7


Index: llvm/test/Feature/packed_struct.ll
diff -u llvm/test/Feature/packed_struct.ll:1.7 
llvm/test/Feature/packed_struct.ll:1.8
--- llvm/test/Feature/packed_struct.ll:1.7  Sat Apr 14 11:40:08 2007
+++ llvm/test/Feature/packed_struct.ll  Sat Apr 14 17:27:05 2007
@@ -2,7 +2,7 @@
 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
 ; RUN: diff %t1.ll %t2.ll
 ; RUN: not grep cast %t2.ll
-; RUN: grep '\<{' %t2.ll
+; RUN: grep {\<\{} %t2.ll
 ; END.
 
 %struct.anon = type <{ i8, i32, i32, i32 }>



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


[llvm-commits] CVS: llvm/test/Transforms/InstCombine/vec_demanded_elts.ll

2007-04-14 Thread Chris Lattner


Changes in directory llvm/test/Transforms/InstCombine:

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

manually upgrade test.  Add a new test2.  I have no way to see if this works
because of the tclification.  :(


---
Diffs of the changes:  (+33 -22)

 vec_demanded_elts.ll |   55 ++-
 1 files changed, 33 insertions(+), 22 deletions(-)


Index: llvm/test/Transforms/InstCombine/vec_demanded_elts.ll
diff -u llvm/test/Transforms/InstCombine/vec_demanded_elts.ll:1.3 
llvm/test/Transforms/InstCombine/vec_demanded_elts.ll:1.4
--- llvm/test/Transforms/InstCombine/vec_demanded_elts.ll:1.3   Sat Apr 14 
15:13:02 2007
+++ llvm/test/Transforms/InstCombine/vec_demanded_elts.ll   Sat Apr 14 
17:27:33 2007
@@ -1,36 +1,47 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | \
 ; RUN:   grep {sub float}
-; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | \
 ; RUN:   grep {mul float}
-; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | \
 ; RUN:   not grep {insertelement.*0.00}
-; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | \
 ; RUN:   not grep {call.*llvm.x86.sse.mul}
-; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | \
 ; RUN:   not grep {call.*llvm.x86.sse.sub}
 ; END.
 
-ushort %Convert_sse(float %f) {
+define i16 @test1(float %f) {
 entry:
-   %tmp = insertelement <4 x float> undef, float %f, uint 0
; <<4 x float>> [#uses=1]
-   %tmp10 = insertelement <4 x float> %tmp, float 0.00e+00, uint 1 
; <<4 x float>> [#uses=1]
-   %tmp11 = insertelement <4 x float> %tmp10, float 0.00e+00, uint 2   
; <<4 x float>> [#uses=1]
-   %tmp12 = insertelement <4 x float> %tmp11, float 0.00e+00, uint 3   
; <<4 x float>> [#uses=1]
-   %tmp28 = tail call <4 x float> %llvm.x86.sse.sub.ss( <4 x float> 
%tmp12, <4 x float> < float 1.00e+00, float 0.00e+00, float 
0.00e+00, float 0.00e+00 > )   ; <<4 x float>> [#uses=1]
-   %tmp37 = tail call <4 x float> %llvm.x86.sse.mul.ss( <4 x float> 
%tmp28, <4 x float> < float 5.00e-01, float 0.00e+00, float 
0.00e+00, float 0.00e+00 > )   ; <<4 x float>> [#uses=1]
-   %tmp48 = tail call <4 x float> %llvm.x86.sse.min.ss( <4 x float> 
%tmp37, <4 x float> < float 6.553500e+04, float 0.00e+00, float 
0.00e+00, float 0.00e+00 > )   ; <<4 x float>> [#uses=1]
-   %tmp59 = tail call <4 x float> %llvm.x86.sse.max.ss( <4 x float> 
%tmp48, <4 x float> zeroinitializer )  ; <<4 x float>> [#uses=1]
-   %tmp = tail call int %llvm.x86.sse.cvttss2si( <4 x float> %tmp59 )  
;  [#uses=1]
-   %tmp69 = cast int %tmp to ushort;  [#uses=1]
-   ret ushort %tmp69
+   %tmp = insertelement <4 x float> undef, float %f, i32 0 ; <<4 x 
float>> [#uses=1]
+   %tmp10 = insertelement <4 x float> %tmp, float 0.00e+00, i32 1  
; <<4 x float>> [#uses=1]
+   %tmp11 = insertelement <4 x float> %tmp10, float 0.00e+00, i32 2
; <<4 x float>> [#uses=1]
+   %tmp12 = insertelement <4 x float> %tmp11, float 0.00e+00, i32 3
; <<4 x float>> [#uses=1]
+   %tmp28 = tail call <4 x float> @llvm.x86.sse.sub.ss( <4 x float> 
%tmp12, <4 x float> < float 1.00e+00, float 0.00e+00, float 
0.00e+00, float 0.00e+00 > )   ; <<4 x float>> [#uses=1]
+   %tmp37 = tail call <4 x float> @llvm.x86.sse.mul.ss( <4 x float> 
%tmp28, <4 x float> < float 5.00e-01, float 0.00e+00, float 
0.00e+00, float 0.00e+00 > )   ; <<4 x float>> [#uses=1]
+   %tmp48 = tail call <4 x float> @llvm.x86.sse.min.ss( <4 x float> 
%tmp37, <4 x float> < float 6.553500e+04, float 0.00e+00, float 
0.00e+00, float 0.00e+00 > )   ; <<4 x float>> [#uses=1]
+   %tmp59 = tail call <4 x float> @llvm.x86.sse.max.ss( <4 x float> 
%tmp48, <4 x float> zeroinitializer )  ; <<4 x float>> [#uses=1]
+   %tmp.upgrd.1 = tail call i32 @llvm.x86.sse.cvttss2si( <4 x float> 
%tmp59 )  ;  [#uses=1]
+   %tmp69 = trunc i32 %tmp.upgrd.1 to i16  ;  [#uses=1]
+   ret i16 %tmp69
 }
 
-declare <4 x float> %llvm.x86.sse.sub.ss(<4 x float>, <4 x float>)
+define i32 @test2(float %f) {
+%tmp5 = mul float %f, %f
+%tmp9 = insertelement <4 x float> undef, float %tmp5, i32 0
 
+%tmp10 = insertelement <4 x float> %tmp9, float 0.00e+00, i32 1
+%tmp11 = insertelement <4 x float> %tmp10, float 0.00e+00, i32 2  
+%tmp12 = insertelement 

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

2007-04-14 Thread Chris Lattner


Changes in directory llvm/lib/Transforms/Scalar:

InstructionCombining.cpp updated: 1.743 -> 1.744
---
Log message:

Implement InstCombine/vec_demanded_elts.ll:test2.  This allows us to turn

unsigned test(float f) {
 return _mm_cvtsi128_si32( (__m128i) _mm_set_ss( f*f ));
}

into:

_test:
movss 4(%esp), %xmm0
mulss %xmm0, %xmm0
movd %xmm0, %eax
ret

instead of:

_test:
movss 4(%esp), %xmm0
mulss %xmm0, %xmm0
xorps %xmm1, %xmm1
movss %xmm0, %xmm1
movd %xmm1, %eax
ret

GCC gets:

_test:
subl$28, %esp
movss   32(%esp), %xmm0
mulss   %xmm0, %xmm0
xorps   %xmm1, %xmm1
movss   %xmm0, %xmm1
movaps  %xmm1, %xmm0
movd%xmm0, 12(%esp)
movl12(%esp), %eax
addl$28, %esp
ret




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

 InstructionCombining.cpp |   66 +++
 1 files changed, 66 insertions(+)


Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.743 
llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.744
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.743   Fri Apr 13 
19:20:02 2007
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Sat Apr 14 17:29:23 2007
@@ -1489,7 +1489,73 @@
 UndefElts |= 1ULL << IdxNo;
 break;
   }
+  case Instruction::BitCast: {
+// Packed->packed casts only.
+const VectorType *VTy = dyn_cast(I->getOperand(0)->getType());
+if (!VTy) break;
+unsigned InVWidth = VTy->getNumElements();
+uint64_t InputDemandedElts = 0;
+unsigned Ratio;
+
+if (VWidth == InVWidth) {
+  // If we are converting from <4x i32> -> <4 x f32>, we demand the same
+  // elements as are demanded of us.
+  Ratio = 1;
+  InputDemandedElts = DemandedElts;
+} else if (VWidth > InVWidth) {
+  // Untested so far.
+  break;
+  
+  // If there are more elements in the result than there are in the source,
+  // then an input element is live if any of the corresponding output
+  // elements are live.
+  Ratio = VWidth/InVWidth;
+  for (unsigned OutIdx = 0; OutIdx != VWidth; ++OutIdx) {
+if (DemandedElts & (1ULL << OutIdx))
+  InputDemandedElts |= 1ULL << (OutIdx/Ratio);
+  }
+} else {
+  // Untested so far.
+  break;
+  
+  // If there are more elements in the source than there are in the result,
+  // then an input element is live if the corresponding output element is
+  // live.
+  Ratio = InVWidth/VWidth;
+  for (unsigned InIdx = 0; InIdx != InVWidth; ++InIdx)
+if (DemandedElts & (1ULL << InIdx/Ratio))
+  InputDemandedElts |= 1ULL << InIdx;
+}
 
+// div/rem demand all inputs, because they don't want divide by zero.
+TmpV = SimplifyDemandedVectorElts(I->getOperand(0), InputDemandedElts,
+  UndefElts2, Depth+1);
+if (TmpV) {
+  I->setOperand(0, TmpV);
+  MadeChange = true;
+}
+
+UndefElts = UndefElts2;
+if (VWidth > InVWidth) {
+  assert(0 && "Unimp");
+  // If there are more elements in the result than there are in the source,
+  // then an output element is undef if the corresponding input element is
+  // undef.
+  for (unsigned OutIdx = 0; OutIdx != VWidth; ++OutIdx)
+if (UndefElts2 & (1ULL << (OutIdx/Ratio)))
+  UndefElts |= 1ULL << OutIdx;
+} else if (VWidth < InVWidth) {
+  assert(0 && "Unimp");
+  // If there are more elements in the source than there are in the result,
+  // then a result element is undef if all of the corresponding input
+  // elements are undef.
+  UndefElts = ~0ULL >> (64-VWidth);  // Start out all undef.
+  for (unsigned InIdx = 0; InIdx != InVWidth; ++InIdx)
+if ((UndefElts2 & (1ULL << InIdx)) == 0)// Not undef?
+  UndefElts &= ~(1ULL << (InIdx/Ratio));// Clear undef bit.
+}
+break;
+  }
   case Instruction::And:
   case Instruction::Or:
   case Instruction::Xor:



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


[llvm-commits] CVS: llvm/test/Integer/packed_struct_bt.ll

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Integer:

packed_struct_bt.ll updated: 1.4 -> 1.5
---
Log message:

Fix syntax.


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

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


Index: llvm/test/Integer/packed_struct_bt.ll
diff -u llvm/test/Integer/packed_struct_bt.ll:1.4 
llvm/test/Integer/packed_struct_bt.ll:1.5
--- llvm/test/Integer/packed_struct_bt.ll:1.4   Sat Apr 14 11:48:55 2007
+++ llvm/test/Integer/packed_struct_bt.ll   Sat Apr 14 17:32:58 2007
@@ -2,7 +2,7 @@
 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
 ; RUN: diff %t1.ll %t2.ll
 ; RUN: not grep cast %t2.ll
-; RUN: grep '\<{' %t2.ll
+; RUN: grep {\<\{} %t2.ll
 ; END.
 
 %struct.anon = type <{ i8, i35, i35, i35 }>



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


[llvm-commits] CVS: llvm/test/Integer/dg.exp

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Integer:

dg.exp updated: 1.3 -> 1.4
---
Log message:

Changes to fix problems with "make check". Apparently you can redefine
functions and Tcl's just tickled with that. The fix is to give the "new"
test system a different interface function name.


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

 dg.exp |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/test/Integer/dg.exp
diff -u llvm/test/Integer/dg.exp:1.3 llvm/test/Integer/dg.exp:1.4
--- llvm/test/Integer/dg.exp:1.3Sat Apr 14 11:48:55 2007
+++ llvm/test/Integer/dg.expSat Apr 14 17:50:08 2007
@@ -1,3 +1,3 @@
 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}]]



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


[llvm-commits] CVS: llvm/test/Feature/dg.exp

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Feature:

dg.exp updated: 1.7 -> 1.8
---
Log message:

Changes to fix problems with "make check". Apparently you can redefine
functions and Tcl's just tickled with that. The fix is to give the "new"
test system a different interface function name.


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

 dg.exp |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/test/Feature/dg.exp
diff -u llvm/test/Feature/dg.exp:1.7 llvm/test/Feature/dg.exp:1.8
--- llvm/test/Feature/dg.exp:1.7Sat Apr 14 11:40:08 2007
+++ llvm/test/Feature/dg.expSat Apr 14 17:50:08 2007
@@ -1,3 +1,3 @@
 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}]]



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


[llvm-commits] CVS: llvm/test/Analysis/Andersens/dg.exp

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Analysis/Andersens:

dg.exp updated: 1.5 -> 1.6
---
Log message:

Changes to fix problems with "make check". Apparently you can redefine
functions and Tcl's just tickled with that. The fix is to give the "new"
test system a different interface function name.


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

 dg.exp |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/test/Analysis/Andersens/dg.exp
diff -u llvm/test/Analysis/Andersens/dg.exp:1.5 
llvm/test/Analysis/Andersens/dg.exp:1.6
--- llvm/test/Analysis/Andersens/dg.exp:1.5 Sat Apr 14 14:10:21 2007
+++ llvm/test/Analysis/Andersens/dg.exp Sat Apr 14 17:50:08 2007
@@ -1,4 +1,4 @@
 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}]]
 



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


[llvm-commits] CVS: llvm/test/Analysis/BasicAA/dg.exp

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Analysis/BasicAA:

dg.exp updated: 1.5 -> 1.6
---
Log message:

Changes to fix problems with "make check". Apparently you can redefine
functions and Tcl's just tickled with that. The fix is to give the "new"
test system a different interface function name.


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

 dg.exp |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/test/Analysis/BasicAA/dg.exp
diff -u llvm/test/Analysis/BasicAA/dg.exp:1.5 
llvm/test/Analysis/BasicAA/dg.exp:1.6
--- llvm/test/Analysis/BasicAA/dg.exp:1.5   Sat Apr 14 14:27:03 2007
+++ llvm/test/Analysis/BasicAA/dg.exp   Sat Apr 14 17:50:08 2007
@@ -1,3 +1,3 @@
 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}]]



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


[llvm-commits] CVS: llvm/test/lib/llvm.exp

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/lib:

llvm.exp updated: 1.5 -> 1.6
---
Log message:

Changes to fix problems with "make check". Apparently you can redefine
functions and Tcl's just tickled with that. The fix is to give the "new"
test system a different interface function name.


---
Diffs of the changes:  (+5 -3)

 llvm.exp |8 +---
 1 files changed, 5 insertions(+), 3 deletions(-)


Index: llvm/test/lib/llvm.exp
diff -u llvm/test/lib/llvm.exp:1.5 llvm/test/lib/llvm.exp:1.6
--- llvm/test/lib/llvm.exp:1.5  Sat Apr 14 14:37:22 2007
+++ llvm/test/lib/llvm.exp  Sat Apr 14 17:50:08 2007
@@ -40,8 +40,10 @@
 
 proc substitute { line test tmpFile } {
   global srcroot objroot srcdir objdir subdir target_triplet prcontext 
-  global llvmgcc llvmgxx global llvmgcc_version llvmgccmajvers 
+  global llvmgcc llvmgxx llvmgcc_version llvmgccmajvers 
   global gccpath gxxpath compile_c compile_cxx link shlibext llvmlibsdir
+  set path [file join $srcdir $subdir]
+  set tmp  [file join Output $tmpFile]
 
   set new_line $line
   #replace %prcontext with prcontext.tcl (Must replace before %p)
@@ -69,7 +71,7 @@
   return $new_line
 }
 
-proc llvm-runtest { programs } {
+proc RunLLVMTests { test_source_files } {
   global srcroot objroot srcdir objdir subdir target_triplet
   set timeout 60
 
@@ -85,7 +87,7 @@
   
   file mkdir Output
 
-  foreach test $programs {
+  foreach test $test_source_files {
 #Should figure out best way to set the timeout
 #set timeout 40
 



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


[llvm-commits] CVS: llvm/test/Transforms/InstCombine/2004-08-10-BoolSetCC.ll dg.exp

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Transforms/InstCombine:

2004-08-10-BoolSetCC.ll updated: 1.4 -> 1.5
dg.exp updated: 1.5 -> 1.6
---
Log message:

Changes to fix problems with "make check". Apparently you can redefine
functions and Tcl's just tickled with that. The fix is to give the "new"
test system a different interface function name.


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

 2004-08-10-BoolSetCC.ll |2 +-
 dg.exp  |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/test/Transforms/InstCombine/2004-08-10-BoolSetCC.ll
diff -u llvm/test/Transforms/InstCombine/2004-08-10-BoolSetCC.ll:1.4 
llvm/test/Transforms/InstCombine/2004-08-10-BoolSetCC.ll:1.5
--- llvm/test/Transforms/InstCombine/2004-08-10-BoolSetCC.ll:1.4Sat Apr 
14 15:13:02 2007
+++ llvm/test/Transforms/InstCombine/2004-08-10-BoolSetCC.llSat Apr 14 
17:51:29 2007
@@ -1,5 +1,5 @@
 ; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \
-; RUN:   grep {ret i1 false}
+; RUN:grep {ret i1 false}
 bool %test(bool %V) {
%Y = setlt bool %V, false
ret bool %Y


Index: llvm/test/Transforms/InstCombine/dg.exp
diff -u llvm/test/Transforms/InstCombine/dg.exp:1.5 
llvm/test/Transforms/InstCombine/dg.exp:1.6
--- llvm/test/Transforms/InstCombine/dg.exp:1.5 Sat Apr 14 15:13:02 2007
+++ llvm/test/Transforms/InstCombine/dg.exp Sat Apr 14 17:51:29 2007
@@ -1,3 +1,3 @@
 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}]]



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


[llvm-commits] CVS: llvm/test/Transforms/ADCE/dg.exp

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Transforms/ADCE:

dg.exp updated: 1.4 -> 1.5
---
Log message:

For PR1319: http://llvm.org/PR1319 :
Convert to new test system.


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

 dg.exp |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/test/Transforms/ADCE/dg.exp
diff -u llvm/test/Transforms/ADCE/dg.exp:1.4 
llvm/test/Transforms/ADCE/dg.exp:1.5
--- llvm/test/Transforms/ADCE/dg.exp:1.4Wed Apr 11 14:56:58 2007
+++ llvm/test/Transforms/ADCE/dg.expSat Apr 14 17:54:01 2007
@@ -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}]]



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


[llvm-commits] CVS: llvm/test/Transforms/InstCombine/vec_extract_elt.ll

2007-04-14 Thread Chris Lattner


Changes in directory llvm/test/Transforms/InstCombine:

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

new testcase


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

 vec_extract_elt.ll |9 +
 1 files changed, 9 insertions(+)


Index: llvm/test/Transforms/InstCombine/vec_extract_elt.ll
diff -c /dev/null llvm/test/Transforms/InstCombine/vec_extract_elt.ll:1.1
*** /dev/null   Sat Apr 14 18:01:01 2007
--- llvm/test/Transforms/InstCombine/vec_extract_elt.ll Sat Apr 14 18:00:51 2007
***
*** 0 
--- 1,9 
+ ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep extractelement
+ 
+ define i32 @test(float %f) {
+ %tmp7 = insertelement <4 x float> undef, float %f, i32 0  
  ; <<4 x float>> [#uses=1]
+ %tmp17 = bitcast <4 x float> %tmp7 to <4 x i32> ; <<4 x i32>> 
[#uses=1]
+ %tmp19 = extractelement <4 x i32> %tmp17, i32 0 ;  
[#uses=1]
+ ret i32 %tmp19
+ }
+ 



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


[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

2007-04-14 Thread Chris Lattner


Changes in directory llvm/lib/Transforms/Scalar:

InstructionCombining.cpp updated: 1.744 -> 1.745
---
Log message:

Implement Transforms/InstCombine/vec_extract_elt.ll, transforming:

define i32 @test(float %f) {
%tmp7 = insertelement <4 x float> undef, float %f, i32 0
%tmp17 = bitcast <4 x float> %tmp7 to <4 x i32> 
%tmp19 = extractelement <4 x i32> %tmp17, i32 0 
ret i32 %tmp19
}

into:

define i32 @test(float %f) {
%tmp19 = bitcast float %f to i32;  [#uses=1]
ret i32 %tmp19
}

On PPC, this is the difference between:

_test:
mfspr r2, 256
oris r3, r2, 8192
mtspr 256: http://llvm.org/PR256 , r3
stfs f1, -16(r1)
addi r3, r1, -16
addi r4, r1, -32
lvx v2, 0, r3
stvx v2, 0, r4
lwz r3, -32(r1)
mtspr 256: http://llvm.org/PR256 , r2
blr 

and:

_test:
stfs f1, -4(r1)
nop
nop
nop
lwz r3, -4(r1)
blr 



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

 InstructionCombining.cpp |   11 +++
 1 files changed, 11 insertions(+)


Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.744 
llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.745
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.744   Sat Apr 14 
17:29:23 2007
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Sat Apr 14 18:02:14 2007
@@ -9109,6 +9109,17 @@
 
 if (Value *Elt = FindScalarElement(EI.getOperand(0), IndexVal))
   return ReplaceInstUsesWith(EI, Elt);
+
+// If the this extractelement is directly using a bitcast from a vector of
+// the same number of elements, see if we can find the source element from
+// it.  In this case, we will end up needing to bitcast the scalars.
+if (BitCastInst *BCI = dyn_cast(EI.getOperand(0))) {
+  if (const VectorType *VT = 
+  dyn_cast(BCI->getOperand(0)->getType()))
+if (VT->getNumElements() == VectorWidth)
+  if (Value *Elt = FindScalarElement(BCI->getOperand(0), IndexVal))
+return new BitCastInst(Elt, EI.getType());
+}
   }
   
   if (Instruction *I = dyn_cast(EI.getOperand(0))) {



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


[llvm-commits] CVS: llvm/test/CodeGen/ARM/2007-03-15-GEP-Idx-Sink.ll

2007-04-14 Thread Chris Lattner


Changes in directory llvm/test/CodeGen/ARM:

2007-03-15-GEP-Idx-Sink.ll updated: 1.2 -> 1.3
---
Log message:

fix test for linux hosts.


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

 2007-03-15-GEP-Idx-Sink.ll |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/test/CodeGen/ARM/2007-03-15-GEP-Idx-Sink.ll
diff -u llvm/test/CodeGen/ARM/2007-03-15-GEP-Idx-Sink.ll:1.2 
llvm/test/CodeGen/ARM/2007-03-15-GEP-Idx-Sink.ll:1.3
--- llvm/test/CodeGen/ARM/2007-03-15-GEP-Idx-Sink.ll:1.2Fri Apr 13 
17:20:27 2007
+++ llvm/test/CodeGen/ARM/2007-03-15-GEP-Idx-Sink.llSat Apr 14 18:04:30 2007
@@ -1,5 +1,5 @@
 ; RUN: llvm-as < %s | llc -march=arm &&
-; RUN: llvm-as < %s | llc -march=arm -stats 2>&1 | not grep 'register spills' 
+; RUN: llvm-as < %s | llc -march=arm -mtriple=arm-apple-darwin8 -stats 2>&1 | 
not grep 'register spills' 
 
 ;; Must talk to evan about this.
 ; XFAIL: *



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


[llvm-commits] CVS: llvm/test/Transforms/ConstProp/2002-05-03-NotOperator.ll 2005-01-28-SetCCGEP.ll 2006-11-30-vector-cast.ll 2006-12-01-TruncBoolBug.ll 2006-12-01-bool-casts.ll 2007-02-23-sdiv.ll cal

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Transforms/ConstProp:

2002-05-03-NotOperator.ll updated: 1.5 -> 1.6
2005-01-28-SetCCGEP.ll updated: 1.2 -> 1.3
2006-11-30-vector-cast.ll updated: 1.4 -> 1.5
2006-12-01-TruncBoolBug.ll updated: 1.3 -> 1.4
2006-12-01-bool-casts.ll updated: 1.3 -> 1.4
2007-02-23-sdiv.ll updated: 1.1 -> 1.2
calls.ll updated: 1.4 -> 1.5
dg.exp updated: 1.4 -> 1.5
float-to-ptr-cast.ll updated: 1.3 -> 1.4
---
Log message:

For PR1913: http://llvm.org/PR1913 :
Convert to new test system. This exposes test/Transforms/ConstProp/calls.ll


---
Diffs of the changes:  (+31 -22)

 2002-05-03-NotOperator.ll  |3 ++-
 2005-01-28-SetCCGEP.ll |3 ++-
 2006-11-30-vector-cast.ll  |6 --
 2006-12-01-TruncBoolBug.ll |3 ++-
 2006-12-01-bool-casts.ll   |6 --
 2007-02-23-sdiv.ll |2 +-
 calls.ll   |   22 +++---
 dg.exp |4 ++--
 float-to-ptr-cast.ll   |4 +++-
 9 files changed, 31 insertions(+), 22 deletions(-)


Index: llvm/test/Transforms/ConstProp/2002-05-03-NotOperator.ll
diff -u llvm/test/Transforms/ConstProp/2002-05-03-NotOperator.ll:1.5 
llvm/test/Transforms/ConstProp/2002-05-03-NotOperator.ll:1.6
--- llvm/test/Transforms/ConstProp/2002-05-03-NotOperator.ll:1.5Fri Dec 
 1 22:23:09 2006
+++ llvm/test/Transforms/ConstProp/2002-05-03-NotOperator.llSat Apr 14 
18:04:54 2007
@@ -4,7 +4,8 @@
 
 ; Fix #2: The unary not instruction now no longer exists. Change to xor.
 
-; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | not grep 'int 
0'
+; RUN: llvm-upgrade < $test | llvm-as | opt -constprop | llvm-dis | \
+; RUN:   not grep {int 0}
 
 int "test1"() {
%R = xor int 123, -1


Index: llvm/test/Transforms/ConstProp/2005-01-28-SetCCGEP.ll
diff -u llvm/test/Transforms/ConstProp/2005-01-28-SetCCGEP.ll:1.2 
llvm/test/Transforms/ConstProp/2005-01-28-SetCCGEP.ll:1.3
--- llvm/test/Transforms/ConstProp/2005-01-28-SetCCGEP.ll:1.2   Fri Dec  1 
22:23:09 2006
+++ llvm/test/Transforms/ConstProp/2005-01-28-SetCCGEP.ll   Sat Apr 14 
18:04:54 2007
@@ -1,4 +1,5 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | not grep 'ret 
bool false'
+; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | \
+; RUN:not grep {ret bool false}
 
 %b = external global [2 x {  }] 
 


Index: llvm/test/Transforms/ConstProp/2006-11-30-vector-cast.ll
diff -u llvm/test/Transforms/ConstProp/2006-11-30-vector-cast.ll:1.4 
llvm/test/Transforms/ConstProp/2006-11-30-vector-cast.ll:1.5
--- llvm/test/Transforms/ConstProp/2006-11-30-vector-cast.ll:1.4Sun Dec 
31 00:01:59 2006
+++ llvm/test/Transforms/ConstProp/2006-11-30-vector-cast.llSat Apr 14 
18:04:54 2007
@@ -1,5 +1,7 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | grep 'i32 -1' 
&&
-; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | not grep 
zeroinitializer
+; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | \
+; RUN:   grep {i32 -1}
+; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | \
+; RUN:   not grep zeroinitializer
 
 < 4 x uint> %test() {
   %tmp40 = bitcast <2 x long> bitcast (<4 x int> < int 0, int 0, int -1, int 0 
> to <2 x long>) to <4 x uint>


Index: llvm/test/Transforms/ConstProp/2006-12-01-TruncBoolBug.ll
diff -u llvm/test/Transforms/ConstProp/2006-12-01-TruncBoolBug.ll:1.3 
llvm/test/Transforms/ConstProp/2006-12-01-TruncBoolBug.ll:1.4
--- llvm/test/Transforms/ConstProp/2006-12-01-TruncBoolBug.ll:1.3   Fri Jan 
12 23:06:52 2007
+++ llvm/test/Transforms/ConstProp/2006-12-01-TruncBoolBug.ll   Sat Apr 14 
18:04:54 2007
@@ -1,4 +1,5 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep 'ret 
i1 false'
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \
+; RUN:   grep {ret i1 false}
 bool %test() {
   %X = trunc uint 320 to bool
   ret bool %X


Index: llvm/test/Transforms/ConstProp/2006-12-01-bool-casts.ll
diff -u llvm/test/Transforms/ConstProp/2006-12-01-bool-casts.ll:1.3 
llvm/test/Transforms/ConstProp/2006-12-01-bool-casts.ll:1.4
--- llvm/test/Transforms/ConstProp/2006-12-01-bool-casts.ll:1.3 Sun Dec 31 
00:01:59 2006
+++ llvm/test/Transforms/ConstProp/2006-12-01-bool-casts.ll Sat Apr 14 
18:04:54 2007
@@ -1,5 +1,7 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | grep 'ret i32 
-1' &&
-; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | grep 'ret i32 
1'
+; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | \
+; RUN:grep {ret i32 -1}
+; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | \
+; RUN:grep {ret i32 1}
 
 int %test1() {
   %A = sext bool true to int


Index: llvm/test/Transforms/ConstProp/2007-02-23-sdiv.ll
diff -u llvm/test/Transforms/ConstProp/2007-02-23-sdiv.ll:1.1 
llvm/test/Transforms/ConstProp/2007-02-23-sdiv.ll:1.2
--- llvm/test/Transforms/ConstProp/2007-02-23-sdiv.ll:1.1   Fri Feb 23 
19:16:39 2007
+++ llvm/test/Tran

[llvm-commits] CVS: llvm/lib/Target/X86/README.txt

2007-04-14 Thread Chris Lattner


Changes in directory llvm/lib/Target/X86:

README.txt updated: 1.164 -> 1.165
---
Log message:

add a note


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

 README.txt |   18 ++
 1 files changed, 18 insertions(+)


Index: llvm/lib/Target/X86/README.txt
diff -u llvm/lib/Target/X86/README.txt:1.164 
llvm/lib/Target/X86/README.txt:1.165
--- llvm/lib/Target/X86/README.txt:1.164Wed Apr 11 00:34:00 2007
+++ llvm/lib/Target/X86/README.txt  Sat Apr 14 18:06:09 2007
@@ -1049,3 +1049,21 @@
 
 //===-===//
 
+This:
+#include 
+unsigned test(float f) {
+ return _mm_cvtsi128_si32( (__m128i) _mm_set_ss( f ));
+}
+
+Compiles to:
+_test:
+movss 4(%esp), %xmm0
+movd %xmm0, %eax
+ret
+
+it should compile to a move from the stack slot directly into eax.  DAGCombine
+has this xform, but it is currently disabled until the alignment fields of 
+the load/store nodes are trustworthy.
+
+
+



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


[llvm-commits] CVS: llvm/test/Transforms/ConstProp/calls.ll

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Transforms/ConstProp:

calls.ll updated: 1.5 -> 1.6
---
Log message:

Oops. A little aggressive on the name changes there.


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

 calls.ll |   16 
 1 files changed, 8 insertions(+), 8 deletions(-)


Index: llvm/test/Transforms/ConstProp/calls.ll
diff -u llvm/test/Transforms/ConstProp/calls.ll:1.5 
llvm/test/Transforms/ConstProp/calls.ll:1.6
--- llvm/test/Transforms/ConstProp/calls.ll:1.5 Sat Apr 14 18:04:54 2007
+++ llvm/test/Transforms/ConstProp/calls.ll Sat Apr 14 18:17:58 2007
@@ -1,18 +1,18 @@
 ; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | not grep call
 
-declare double %cos.f64(double)
-declare double %sin.f64(double)
-declare double %tan.f64(double)
-declare double %sqrt.f64(double)
+declare double %cos(double)
+declare double %sin(double)
+declare double %tan(double)
+declare double %sqrt(double)
 declare bool %llvm.isunordered.f64(double, double)
 
 double %T() {
-   %A = call double %cos.f64(double 0.0)
-   %B = call double %sin.f64(double 0.0)
+   %A = call double %cos(double 0.0)
+   %B = call double %sin(double 0.0)
%a = add double %A, %B
-   %C = call double %tan.f64(double 0.0)
+   %C = call double %tan(double 0.0)
%b = add double %a, %C
-   %D = call double %sqrt.f64(double 4.0)
+   %D = call double %sqrt(double 4.0)
%c = add double %b, %D
ret double %c
 }



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


[llvm-commits] CVS: llvm/docs/TestingGuide.html

2007-04-14 Thread Reid Spencer


Changes in directory llvm/docs:

TestingGuide.html updated: 1.41 -> 1.42
---
Log message:

Add some info about the pipelines and redirection.


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

 TestingGuide.html |   20 +++-
 1 files changed, 19 insertions(+), 1 deletion(-)


Index: llvm/docs/TestingGuide.html
diff -u llvm/docs/TestingGuide.html:1.41 llvm/docs/TestingGuide.html:1.42
--- llvm/docs/TestingGuide.html:1.41Sat Apr 14 16:46:15 2007
+++ llvm/docs/TestingGuide.html Sat Apr 14 18:27:06 2007
@@ -323,6 +323,24 @@
   any process in the pipeline fails, the entire line (and test case) fails too.
   
 
+  As with a Unix shell, the RUN: lines permit pipelines and I/O redirection
+  to be used. However, the usage is slightly different than for Bash. To check
+  what's legal, see the documentation for the 
+  http://www.tcl.tk/man/tcl8.5/TclCmd/exec.htm#M2";>Tcl exec
+  command and the 
+  http://www.tcl.tk/man/tcl8.5/tutorial/Tcl26.html";>tutorial. 
+  The major differences are:
+  
+You can't do 2>&1. That will cause Tcl to write to a
+file named &1. Usually this is done to get stderr to go 
through
+a pipe. You can do that in tcl with |& so replace this idiom:
+... 2>&1 | grep with ... |& grep
+You can only redirect to a file, not to another descriptor and not from
+a here document.
+tcl supports redirecting to open files with the @ syntax but you
+shouldn't use that here.
+  
+
Below is an example of legal RUN lines in a .ll file:
   
   ; RUN: llvm-as < %s | llvm-dis > %t1
@@ -756,7 +774,7 @@
 
   John T. Criswell, Reid Spencer, and Tanya Lattner
   http://llvm.org";>The LLVM Compiler Infrastructure
-  Last modified: $Date: 2007/04/14 21:46:15 $
+  Last modified: $Date: 2007/04/14 23:27:06 $
 
 
 



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


[llvm-commits] CVS: llvm/lib/Transforms/Scalar/GCSE.cpp InstructionCombining.cpp LICM.cpp LoopRotation.cpp PredicateSimplifier.cpp SCCP.cpp

2007-04-14 Thread Chris Lattner


Changes in directory llvm/lib/Transforms/Scalar:

GCSE.cpp updated: 1.52 -> 1.53
InstructionCombining.cpp updated: 1.745 -> 1.746
LICM.cpp updated: 1.89 -> 1.90
LoopRotation.cpp updated: 1.9 -> 1.10
PredicateSimplifier.cpp updated: 1.66 -> 1.67
SCCP.cpp updated: 1.164 -> 1.165
---
Log message:

fix long lines


---
Diffs of the changes:  (+20 -18)

 GCSE.cpp |2 +-
 InstructionCombining.cpp |   17 +
 LICM.cpp |2 +-
 LoopRotation.cpp |4 ++--
 PredicateSimplifier.cpp  |5 +++--
 SCCP.cpp |8 
 6 files changed, 20 insertions(+), 18 deletions(-)


Index: llvm/lib/Transforms/Scalar/GCSE.cpp
diff -u llvm/lib/Transforms/Scalar/GCSE.cpp:1.52 
llvm/lib/Transforms/Scalar/GCSE.cpp:1.53
--- llvm/lib/Transforms/Scalar/GCSE.cpp:1.52Mon Feb  5 17:32:05 2007
+++ llvm/lib/Transforms/Scalar/GCSE.cpp Sat Apr 14 18:32:02 2007
@@ -73,7 +73,7 @@
   // Check for value numbers of arguments.  If the value numbering
   // implementation can prove that an incoming argument is a constant or global
   // value address, substitute it, making the argument dead.
-  for (Function::arg_iterator AI = F.arg_begin(), E = F.arg_end(); AI != E; 
++AI)
+  for (Function::arg_iterator AI = F.arg_begin(), E = F.arg_end(); AI != 
E;++AI)
 if (!AI->use_empty()) {
   VN.getEqualNumberNodes(AI, EqualValues);
   if (!EqualValues.empty()) {


Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.745 
llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.746
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.745   Sat Apr 14 
18:02:14 2007
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Sat Apr 14 18:32:02 2007
@@ -5523,8 +5523,8 @@
   }
 }
   } else {  // Not a ICMP_EQ/ICMP_NE
-// If the LHS is a cast from an integral value of the same size, 
then 
-// since we know the RHS is a constant, try to simlify.
+// If the LHS is a cast from an integral value of the same size, 
+// then since we know the RHS is a constant, try to simlify.
 if (CastInst *Cast = dyn_cast(LHSI)) {
   Value *CastOp = Cast->getOperand(0);
   const Type *SrcTy = CastOp->getType();
@@ -6231,7 +6231,7 @@
   MaskedValueIsZero(I->getOperand(0),
 APInt::getHighBitsSet(OrigBitWidth, OrigBitWidth-BitWidth)) &&
   CI->getLimitedValue(BitWidth) < BitWidth) {
-return CanEvaluateInDifferentType(I->getOperand(0), Ty, 
NumCastsRemoved);
+return CanEvaluateInDifferentType(I->getOperand(0), 
Ty,NumCastsRemoved);
   }
 }
 break;
@@ -6645,7 +6645,7 @@
 Value *Sh = ConstantInt::get(In->getType(),
 In->getType()->getPrimitiveSizeInBits()-1);
 In = InsertNewInstBefore(BinaryOperator::createLShr(In, Sh,
-
In->getName()+".lobit"), 
+
In->getName()+".lobit"),
  CI);
 if (In->getType() != CI.getType())
   In = CastInst::createIntegerCast(In, CI.getType(),
@@ -6654,7 +6654,7 @@
 if (ICI->getPredicate() == ICmpInst::ICMP_SGT) {
   Constant *One = ConstantInt::get(In->getType(), 1);
   In = InsertNewInstBefore(BinaryOperator::createXor(In, One,
-  
In->getName()+".not"), 
+  
In->getName()+".not"),
CI);
 }
 
@@ -6742,7 +6742,7 @@
 Value *Sh = ConstantInt::get(In->getType(),
  
In->getType()->getPrimitiveSizeInBits()-1);
 In = InsertNewInstBefore(BinaryOperator::createAShr(In, Sh,
-
In->getName()+".lobit"), 
+
In->getName()+".lobit"),
  CI);
 if (In->getType() != CI.getType())
   In = CastInst::createIntegerCast(In, CI.getType(),
@@ -7484,7 +7484,7 @@
   for (unsigned i = 0; i != 16; ++i) {
 if (isa(Mask->getOperand(i)))
   continue;
-unsigned Idx 
=cast(Mask->getOperand(i))->getZExtValue();
+unsigned 
Idx=cast(Mask->getOperand(i))->getZExtValue();
 Idx &= 31;  // Match the hardware behavior.
 
 if (ExtractedElts[Idx] == 0) {
@@ -9331,7 +9331,8 @@
 if (isa(EI->getOperand(1)) && isa(IdxOp) &&
 EI->getOperand(0)->getType() == IE.getType()) {
   unsigned NumVectorElts = IE.getType()->getNumElements();
-  unsigned 
ExtractedIdx=cast(EI->getOperand(1))->getZExtValue();
+  unsigned ExtractedIdx =
+cast(EI->getOperand(1))->getZExtValue();
   unsigned InsertedIdx = cast(IdxOp)->getZExtVa

[llvm-commits] CVS: llvm/Makefile.rules

2007-04-14 Thread Chris Lattner


Changes in directory llvm:

Makefile.rules updated: 1.430 -> 1.431
---
Log message:

add a target to print out 80-column violations.


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

 Makefile.rules |3 +++
 1 files changed, 3 insertions(+)


Index: llvm/Makefile.rules
diff -u llvm/Makefile.rules:1.430 llvm/Makefile.rules:1.431
--- llvm/Makefile.rules:1.430   Mon Apr  9 14:08:58 2007
+++ llvm/Makefile.rules Sat Apr 14 18:35:45 2007
@@ -1725,6 +1725,9 @@
 endif
 endif
 
+check-line-length:
+   @egrep '.{81}' $(Sources)
+
 #
 # Print out the directories used for building
 #



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


[llvm-commits] CVS: llvm/test/CodeGen/Generic/2007-04-14-BitTestsBadMask.ll

2007-04-14 Thread Chris Lattner


Changes in directory llvm/test/CodeGen/Generic:

2007-04-14-BitTestsBadMask.ll updated: 1.1 -> 1.2
---
Log message:

xfail for now


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

 2007-04-14-BitTestsBadMask.ll |3 +++
 1 files changed, 3 insertions(+)


Index: llvm/test/CodeGen/Generic/2007-04-14-BitTestsBadMask.ll
diff -u llvm/test/CodeGen/Generic/2007-04-14-BitTestsBadMask.ll:1.1 
llvm/test/CodeGen/Generic/2007-04-14-BitTestsBadMask.ll:1.2
--- llvm/test/CodeGen/Generic/2007-04-14-BitTestsBadMask.ll:1.1 Sat Apr 14 
08:25:55 2007
+++ llvm/test/CodeGen/Generic/2007-04-14-BitTestsBadMask.ll Sat Apr 14 
18:40:49 2007
@@ -2,6 +2,9 @@
 ; RUN: llvm-as < %s | llc -march=x86-64 | grep '4294981120'
 ; PR 1325
 
+; FIXME: this is xfailed until we figure out ppc bootstrap
+; XFAIL: *
+
 ; ModuleID = 'bugpoint.test.bc'
 target datalayout = 
"E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64"
 target triple = "powerpc-apple-darwin8.8.0"



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


[llvm-commits] CVS: llvm/lib/VMCore/Dominators.cpp

2007-04-14 Thread Owen Anderson


Changes in directory llvm/lib/VMCore:

Dominators.cpp updated: 1.92 -> 1.93
---
Log message:

Make ETForest depend on DomTree rather than IDom.  This is the first step
in the long process that will be fixing PR 217: http://llvm.org/PR217 .


---
Diffs of the changes:  (+11 -8)

 Dominators.cpp |   19 +++
 1 files changed, 11 insertions(+), 8 deletions(-)


Index: llvm/lib/VMCore/Dominators.cpp
diff -u llvm/lib/VMCore/Dominators.cpp:1.92 llvm/lib/VMCore/Dominators.cpp:1.93
--- llvm/lib/VMCore/Dominators.cpp:1.92 Mon Apr  9 01:44:42 2007
+++ llvm/lib/VMCore/Dominators.cpp  Sat Apr 14 18:49:24 2007
@@ -899,15 +899,15 @@
   BasicBlock *BBA = A->getParent(), *BBB = B->getParent();
   if (BBA != BBB) return dominates(BBA, BBB);
   
-  // Loop through the basic block until we find A or B.
-  BasicBlock::iterator I = BBA->begin();
-  for (; &*I != A && &*I != B; ++I) /*empty*/;
-  
   // It is not possible to determine dominance between two PHI nodes 
   // based on their ordering.
   if (isa(A) && isa(B)) 
 return false;
 
+  // Loop through the basic block until we find A or B.
+  BasicBlock::iterator I = BBA->begin();
+  for (; &*I != A && &*I != B; ++I) /*empty*/;
+  
   if(!IsPostDominators) {
 // A dominates B if it is found first in the basic block.
 return &*I == A;
@@ -929,7 +929,7 @@
 
   // Haven't calculated this node yet?  Get or calculate the node for the
   // immediate dominator.
-  BasicBlock *IDom = getAnalysis()[BB];
+   BasicBlock *IDom = 
getAnalysis().getNode(BB)->getIDom()->getBlock();
 
   // If we are unreachable, we may not have an immediate dominator.
   if (!IDom)
@@ -945,15 +945,17 @@
   }
 }
 
-void ETForest::calculate(const ImmediateDominators &ID) {
+void ETForest::calculate(const DominatorTree &DT) {
   assert(Roots.size() == 1 && "ETForest should have 1 root block!");
   BasicBlock *Root = Roots[0];
   Nodes[Root] = new ETNode(Root); // Add a node for the root
 
   Function *F = Root->getParent();
   // Loop over all of the reachable blocks in the function...
-  for (Function::iterator I = F->begin(), E = F->end(); I != E; ++I)
-if (BasicBlock *ImmDom = ID.get(I)) {  // Reachable block.
+  for (Function::iterator I = F->begin(), E = F->end(); I != E; ++I) {
+   DominatorTree::Node* node = DT.getNode(I);
+if (node && node->getIDom()) {  // Reachable block.
+   BasicBlock* ImmDom = node->getIDom()->getBlock();
   ETNode *&BBNode = Nodes[I];
   if (!BBNode) {  // Haven't calculated this node yet?
 // Get or calculate the node for the immediate dominator
@@ -965,6 +967,7 @@
 BBNode->setFather(IDomNode);
   }
 }
+   }
 
   // Make sure we've got nodes around for every block
   for (Function::iterator I = F->begin(), E = F->end(); I != E; ++I) {



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


[llvm-commits] CVS: llvm/include/llvm/Analysis/Dominators.h

2007-04-14 Thread Owen Anderson


Changes in directory llvm/include/llvm/Analysis:

Dominators.h updated: 1.69 -> 1.70
---
Log message:

Make ETForest depend on DomTree rather than IDom.  This is the first step
in the long process that will be fixing PR 217: http://llvm.org/PR217 .


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

 Dominators.h |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)


Index: llvm/include/llvm/Analysis/Dominators.h
diff -u llvm/include/llvm/Analysis/Dominators.h:1.69 
llvm/include/llvm/Analysis/Dominators.h:1.70
--- llvm/include/llvm/Analysis/Dominators.h:1.69Sun Apr  8 23:07:36 2007
+++ llvm/include/llvm/Analysis/Dominators.h Sat Apr 14 18:49:24 2007
@@ -422,7 +422,7 @@
 
   virtual void getAnalysisUsage(AnalysisUsage &AU) const {
 AU.setPreservesAll();
-AU.addRequired();
+AU.addRequired();
   }
   
//======//
   // API to update Forest information based on modifications
@@ -480,13 +480,13 @@
 
   virtual bool runOnFunction(Function &F) {
 reset(); // Reset from the last time we were run...
-ImmediateDominators &ID = getAnalysis();
-Roots = ID.getRoots();
-calculate(ID);
+DominatorTree &DT = getAnalysis();
+Roots = DT.getRoots();
+calculate(DT);
 return false;
   }
 
-  void calculate(const ImmediateDominators &ID);
+  void calculate(const DominatorTree &DT);
   ETNode *getNodeForBlock(BasicBlock *BB);
 };
 



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


[llvm-commits] CVS: llvm/lib/VMCore/Dominators.cpp

2007-04-14 Thread Owen Anderson


Changes in directory llvm/lib/VMCore:

Dominators.cpp updated: 1.93 -> 1.94
---
Log message:

Fix some unsafe code.  Also, tabs -> spaces.


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

 Dominators.cpp |   12 ++--
 1 files changed, 6 insertions(+), 6 deletions(-)


Index: llvm/lib/VMCore/Dominators.cpp
diff -u llvm/lib/VMCore/Dominators.cpp:1.93 llvm/lib/VMCore/Dominators.cpp:1.94
--- llvm/lib/VMCore/Dominators.cpp:1.93 Sat Apr 14 18:49:24 2007
+++ llvm/lib/VMCore/Dominators.cpp  Sat Apr 14 18:57:00 2007
@@ -929,13 +929,13 @@
 
   // Haven't calculated this node yet?  Get or calculate the node for the
   // immediate dominator.
-   BasicBlock *IDom = 
getAnalysis().getNode(BB)->getIDom()->getBlock();
+  DominatorTree::Node *node= getAnalysis().getNode(BB);
 
   // If we are unreachable, we may not have an immediate dominator.
-  if (!IDom)
+  if (!node || !node->getIDom())
 return BBNode = new ETNode(BB);
   else {
-ETNode *IDomNode = getNodeForBlock(IDom);
+ETNode *IDomNode = getNodeForBlock(node->getIDom()->getBlock());
 
 // Add a new tree node for this BasicBlock, and link it as a child of
 // IDomNode
@@ -953,9 +953,9 @@
   Function *F = Root->getParent();
   // Loop over all of the reachable blocks in the function...
   for (Function::iterator I = F->begin(), E = F->end(); I != E; ++I) {
-   DominatorTree::Node* node = DT.getNode(I);
+DominatorTree::Node* node = DT.getNode(I);
 if (node && node->getIDom()) {  // Reachable block.
-   BasicBlock* ImmDom = node->getIDom()->getBlock();
+  BasicBlock* ImmDom = node->getIDom()->getBlock();
   ETNode *&BBNode = Nodes[I];
   if (!BBNode) {  // Haven't calculated this node yet?
 // Get or calculate the node for the immediate dominator
@@ -967,7 +967,7 @@
 BBNode->setFather(IDomNode);
   }
 }
-   }
+  }
 
   // Make sure we've got nodes around for every block
   for (Function::iterator I = F->begin(), E = F->end(); I != E; ++I) {



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


[llvm-commits] CVS: llvm/test/Transforms/InstCombine/apint-binop-cast.ll

2007-04-14 Thread Owen Anderson


Changes in directory llvm/test/Transforms/InstCombine:

apint-binop-cast.ll updated: 1.2 -> 1.3
---
Log message:

XFAIL this for now.


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

 apint-binop-cast.ll |1 +
 1 files changed, 1 insertion(+)


Index: llvm/test/Transforms/InstCombine/apint-binop-cast.ll
diff -u llvm/test/Transforms/InstCombine/apint-binop-cast.ll:1.2 
llvm/test/Transforms/InstCombine/apint-binop-cast.ll:1.3
--- llvm/test/Transforms/InstCombine/apint-binop-cast.ll:1.2Sat Apr 14 
13:26:02 2007
+++ llvm/test/Transforms/InstCombine/apint-binop-cast.llSat Apr 14 
18:57:41 2007
@@ -1,3 +1,4 @@
+; XFAIL: *
 ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | notcast
 
 define i47 @testAdd(i31 %X, i31 %Y) {



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


[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

2007-04-14 Thread Chris Lattner


Changes in directory llvm/lib/Transforms/Scalar:

InstructionCombining.cpp updated: 1.746 -> 1.747
---
Log message:

refactor some code, no functionality change.


---
Diffs of the changes:  (+77 -58)

 InstructionCombining.cpp |  135 ++-
 1 files changed, 77 insertions(+), 58 deletions(-)


Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.746 
llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.747
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.746   Sat Apr 14 
18:32:02 2007
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Sat Apr 14 19:07:55 2007
@@ -352,6 +352,7 @@
  bool isSigned, bool Inside, Instruction &IB);
 Instruction *PromoteCastOfAllocation(CastInst &CI, AllocationInst &AI);
 Instruction *MatchBSwap(BinaryOperator &I);
+bool SimplifyStoreAtEndOfBlock(StoreInst &SI);
 
 Value *EvaluateInDifferentType(Value *V, const Type *Ty, bool isSigned);
   };
@@ -8818,68 +8819,86 @@
   // ends with an unconditional branch, try to move it to the successor block.
   BBI = &SI; ++BBI;
   if (BranchInst *BI = dyn_cast(BBI))
-if (BI->isUnconditional()) {
-  // Check to see if the successor block has exactly two incoming edges.  
If
-  // so, see if the other predecessor contains a store to the same 
location.
-  // if so, insert a PHI node (if needed) and move the stores down.
-  BasicBlock *Dest = BI->getSuccessor(0);
-
-  pred_iterator PI = pred_begin(Dest);
-  BasicBlock *Other = 0;
-  if (*PI != BI->getParent())
-Other = *PI;
-  ++PI;
-  if (PI != pred_end(Dest)) {
-if (*PI != BI->getParent())
-  if (Other)
-Other = 0;
-  else
-Other = *PI;
-if (++PI != pred_end(Dest))
-  Other = 0;
-  }
-  if (Other) {  // If only one other pred...
-BBI = Other->getTerminator();
-// Make sure this other block ends in an unconditional branch and that
-// there is an instruction before the branch.
-if (isa(BBI) && cast(BBI)->isUnconditional() &&
-BBI != Other->begin()) {
-  --BBI;
-  StoreInst *OtherStore = dyn_cast(BBI);
-  
-  // If this instruction is a store to the same location.
-  if (OtherStore && OtherStore->getOperand(1) == SI.getOperand(1)) {
-// Okay, we know we can perform this transformation.  Insert a PHI
-// node now if we need it.
-Value *MergedVal = OtherStore->getOperand(0);
-if (MergedVal != SI.getOperand(0)) {
-  PHINode *PN = new PHINode(MergedVal->getType(), "storemerge");
-  PN->reserveOperandSpace(2);
-  PN->addIncoming(SI.getOperand(0), SI.getParent());
-  PN->addIncoming(OtherStore->getOperand(0), Other);
-  MergedVal = InsertNewInstBefore(PN, Dest->front());
-}
-
-// Advance to a place where it is safe to insert the new store and
-// insert it.
-BBI = Dest->begin();
-while (isa(BBI)) ++BBI;
-InsertNewInstBefore(new StoreInst(MergedVal, SI.getOperand(1),
-  OtherStore->isVolatile()), *BBI);
-
-// Nuke the old stores.
-EraseInstFromFunction(SI);
-EraseInstFromFunction(*OtherStore);
-++NumCombined;
-return 0;
-  }
-}
-  }
-}
+if (BI->isUnconditional())
+  if (SimplifyStoreAtEndOfBlock(SI))
+return 0;  // xform done!
   
   return 0;
 }
 
+/// SimplifyStoreAtEndOfBlock - Turn things like:
+///   if () { *P = v1; } else { *P = v2 }
+/// into a phi node with a store in the successor.
+///
+bool InstCombiner::SimplifyStoreAtEndOfBlock(StoreInst &SI) {
+  BasicBlock *StoreBB = SI.getParent();
+  
+  // Check to see if the successor block has exactly two incoming edges.  If
+  // so, see if the other predecessor contains a store to the same location.
+  // if so, insert a PHI node (if needed) and move the stores down.
+  BasicBlock *Dest = StoreBB->getTerminator()->getSuccessor(0);
+  
+  // Determine whether Dest has exactly two predecessors and, if so, compute
+  // the other predecessor.
+  pred_iterator PI = pred_begin(Dest);
+  BasicBlock *Other = 0;
+  if (*PI != StoreBB)
+Other = *PI;
+  ++PI;
+  if (PI == pred_end(Dest))
+return false;
+  
+  if (*PI != StoreBB) {
+if (Other)
+  return false;
+Other = *PI;
+  }
+  if (++PI != pred_end(Dest))
+return false;
+  
+  
+  BasicBlock::iterator BBI = Other->getTerminator();
+  BranchInst *OtherBr = dyn_cast(BBI);
+  
+  // Make sure this other block ends in an unconditional branch and that
+  // there is an instruction before the branch.
+  if (!OtherBr || !cast(BBI)->isUnconditional() ||
+  BBI == Other->begin())
+ 

[llvm-commits] [126125] Make llvm honor -fno-builtin.

2007-04-14 Thread johannes
Revision: 126125
Author:   johannes
Date: 2007-04-14 17:14:13 -0700 (Sat, 14 Apr 2007)

Log Message:
---
Make llvm honor -fno-builtin.

Modified Paths:
--
apple-local/branches/llvm/gcc/c-common.c
apple-local/branches/llvm/gcc/c-common.h
apple-local/branches/llvm/gcc/c-objc-common.h
apple-local/branches/llvm/gcc/cp/cp-objcp-common.h
apple-local/branches/llvm/gcc/langhooks-def.h
apple-local/branches/llvm/gcc/langhooks.h
apple-local/branches/llvm/gcc/llvm-backend.cpp

Modified: apple-local/branches/llvm/gcc/c-common.c
===
--- apple-local/branches/llvm/gcc/c-common.c2007-04-14 19:42:51 UTC (rev 
126124)
+++ apple-local/branches/llvm/gcc/c-common.c2007-04-15 00:14:13 UTC (rev 
126125)
@@ -8008,4 +8008,10 @@
 }
 /* APPLE LOCAL end CW asm blocks */
 
+/* APPLE LOCAL begin define this sensibly in all languages */
+bool c_flag_no_builtin(void) {
+  return flag_no_builtin;
+}
+/* APPLE LOCAL end define this sensibly in all languages */
+
 #include "gt-c-common.h"

Modified: apple-local/branches/llvm/gcc/c-common.h
===
--- apple-local/branches/llvm/gcc/c-common.h2007-04-14 19:42:51 UTC (rev 
126124)
+++ apple-local/branches/llvm/gcc/c-common.h2007-04-15 00:14:13 UTC (rev 
126125)
@@ -798,6 +798,8 @@
 /* APPLE LOCAL begin IMA built-in decl merging fix (radar 3645899) */
 extern bool builtin_function_disabled_p (const char *);
 /* APPLE LOCAL end */
+/* APPLE LOCAL define this sensibly in all languages */
+extern bool c_flag_no_builtin (void);
 
 /* This is the basic parsing function.  */
 extern void c_parse_file (void);

Modified: apple-local/branches/llvm/gcc/c-objc-common.h
===
--- apple-local/branches/llvm/gcc/c-objc-common.h   2007-04-14 19:42:51 UTC 
(rev 126124)
+++ apple-local/branches/llvm/gcc/c-objc-common.h   2007-04-15 00:14:13 UTC 
(rev 126125)
@@ -117,6 +117,10 @@
 #define LANG_HOOKS_TYPE_PROMOTES_TO c_type_promotes_to
 #undef LANG_HOOKS_REGISTER_BUILTIN_TYPE
 #define LANG_HOOKS_REGISTER_BUILTIN_TYPE c_register_builtin_type
+/* APPLE LOCAL begin define this sensibly in all languages */
+#undef LANG_HOOKS_FLAG_NO_BUILTIN
+#define LANG_HOOKS_FLAG_NO_BUILTIN c_flag_no_builtin
+/* APPLE LOCAL end define this sensibly in all languages */
 #undef LANG_HOOKS_TO_TARGET_CHARSET
 #define LANG_HOOKS_TO_TARGET_CHARSET c_common_to_target_charset
 

Modified: apple-local/branches/llvm/gcc/cp/cp-objcp-common.h
===
--- apple-local/branches/llvm/gcc/cp/cp-objcp-common.h  2007-04-14 19:42:51 UTC 
(rev 126124)
+++ apple-local/branches/llvm/gcc/cp/cp-objcp-common.h  2007-04-15 00:14:13 UTC 
(rev 126125)
@@ -152,6 +152,10 @@
 #define LANG_HOOKS_TYPE_PROMOTES_TO cxx_type_promotes_to
 #undef LANG_HOOKS_REGISTER_BUILTIN_TYPE
 #define LANG_HOOKS_REGISTER_BUILTIN_TYPE c_register_builtin_type
+/* APPLE LOCAL begin define this sensibly in all languages */
+#undef LANG_HOOKS_FLAG_NO_BUILTIN
+#define LANG_HOOKS_FLAG_NO_BUILTIN c_flag_no_builtin
+/* APPLE LOCAL end define this sensibly in all languages */
 #undef LANG_HOOKS_TO_TARGET_CHARSET
 #define LANG_HOOKS_TO_TARGET_CHARSET c_common_to_target_charset
 #undef LANG_HOOKS_GIMPLIFY_EXPR

Modified: apple-local/branches/llvm/gcc/langhooks-def.h
===
--- apple-local/branches/llvm/gcc/langhooks-def.h   2007-04-14 19:42:51 UTC 
(rev 126124)
+++ apple-local/branches/llvm/gcc/langhooks-def.h   2007-04-15 00:14:13 UTC 
(rev 126125)
@@ -129,6 +129,8 @@
 #define LANG_HOOKS_TREE_SIZE   lhd_tree_size
 #define LANG_HOOKS_TYPES_COMPATIBLE_P  lhd_types_compatible_p
 #define LANG_HOOKS_BUILTIN_FUNCTIONbuiltin_function
+/* APPLE LOCAL define this sensibly for all languages */
+#define LANG_HOOKS_FLAG_NO_BUILTIN  hook_bool_void_false
 #define LANG_HOOKS_TO_TARGET_CHARSET   lhd_to_target_charset
 
 #define LANG_HOOKS_FUNCTION_INIT   lhd_do_nothing_f
@@ -310,6 +312,8 @@
   LANG_HOOKS_GIMPLIFY_EXPR, \
   LANG_HOOKS_FOLD_OBJ_TYPE_REF, \
   LANG_HOOKS_BUILTIN_FUNCTION, \
+/* APPLE LOCAL define this sensibly for all languages */ \
+  LANG_HOOKS_FLAG_NO_BUILTIN, \
 }
 
 #endif /* GCC_LANG_HOOKS_DEF_H */

Modified: apple-local/branches/llvm/gcc/langhooks.h
===
--- apple-local/branches/llvm/gcc/langhooks.h   2007-04-14 19:42:51 UTC (rev 
126124)
+++ apple-local/branches/llvm/gcc/langhooks.h   2007-04-15 00:14:13 UTC (rev 
126125)
@@ -434,6 +434,9 @@
enum built_in_class bt_class,
const char *library_name, tree attrs);
 
+  /* APPLE LOCAL define this sensibly for all languages */
+  bool (*flag_no_builtin)(void);
+
   /* Whenever you add entries here, make sure you adjust langhoo

[llvm-commits] [126126] Improve handling of aggregate inputs to asm, per Chris' suggestion

2007-04-14 Thread johannes
Revision: 126126
Author:   johannes
Date: 2007-04-14 17:15:43 -0700 (Sat, 14 Apr 2007)

Log Message:
---
Improve handling of aggregate inputs to asm, per Chris' suggestion

Modified Paths:
--
apple-local/branches/llvm/gcc/llvm-convert.cpp

Modified: apple-local/branches/llvm/gcc/llvm-convert.cpp
===
--- apple-local/branches/llvm/gcc/llvm-convert.cpp  2007-04-15 00:14:13 UTC 
(rev 126125)
+++ apple-local/branches/llvm/gcc/llvm-convert.cpp  2007-04-15 00:15:43 UTC 
(rev 126126)
@@ -3720,11 +3720,10 @@
   if (!LLVMTy->isFirstClassType()) {
 // Structs and unions are permitted here, as long as they're the
 // same size as a register.
-Value *Target = CreateTemporary(LLVMTy);  
 LValue LV = EmitLV(Val);
-EmitAggregateCopy(Target, LV.Ptr, type, false, TREE_THIS_VOLATILE 
(Val));
+assert(!LV.isBitfield());
 LLVMTy = IntegerType::get(TD.getTypeSizeInBits(LLVMTy));
-Op = new LoadInst(CastToType(Instruction::BitCast, Target,
+Op = new LoadInst(CastToType(Instruction::BitCast, LV.Ptr,
   PointerType::get(LLVMTy)), "tmp", CurBB);
   } else {
 Op = Emit(Val, 0);


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


[llvm-commits] CVS: llvm/test/CFrontend/2007-04-14-FNoBuiltin.c

2007-04-14 Thread Dale Johannesen


Changes in directory llvm/test/CFrontend:

2007-04-14-FNoBuiltin.c added (r1.1)
---
Log message:

testcases for -fno-builtin


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

 2007-04-14-FNoBuiltin.c |7 +++
 1 files changed, 7 insertions(+)


Index: llvm/test/CFrontend/2007-04-14-FNoBuiltin.c
diff -c /dev/null llvm/test/CFrontend/2007-04-14-FNoBuiltin.c:1.1
*** /dev/null   Sat Apr 14 19:18:41 2007
--- llvm/test/CFrontend/2007-04-14-FNoBuiltin.c Sat Apr 14 19:18:30 2007
***
*** 0 
--- 1,7 
+ // RUN: %llvmgcc -S %s -O2 -fno-builtin -o - | llvm-as -f | llc | grep -v puts
+ // Check that -fno-builtin is honored.
+ 
+ extern int printf(const char*, ...);
+ void foo(const char *msg) {
+   printf("%s\n",msg);
+ }



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


[llvm-commits] CVS: llvm/test/C++Frontend/2007-04-14-FNoBuiltin.cpp

2007-04-14 Thread Dale Johannesen


Changes in directory llvm/test/C++Frontend:

2007-04-14-FNoBuiltin.cpp added (r1.1)
---
Log message:

testcases for -fno-builtin


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

 2007-04-14-FNoBuiltin.cpp |7 +++
 1 files changed, 7 insertions(+)


Index: llvm/test/C++Frontend/2007-04-14-FNoBuiltin.cpp
diff -c /dev/null llvm/test/C++Frontend/2007-04-14-FNoBuiltin.cpp:1.1
*** /dev/null   Sat Apr 14 19:18:41 2007
--- llvm/test/C++Frontend/2007-04-14-FNoBuiltin.cpp Sat Apr 14 19:18:31 2007
***
*** 0 
--- 1,7 
+ // RUN: %llvmgcc -S %s -O2 -fno-builtin -o - | llvm-as -f | llc | grep -v puts
+ // Check that -fno-builtin is honored.
+ 
+ extern "C" int printf(const char*, ...);
+ void foo(const char *msg) {
+   printf("%s\n",msg);
+ }



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


[llvm-commits] CVS: llvm/test/Transforms/InstCombine/store-merge.ll

2007-04-14 Thread Chris Lattner


Changes in directory llvm/test/Transforms/InstCombine:

store-merge.ll added (r1.1)
---
Log message:

new testcase


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

 store-merge.ll |   36 
 1 files changed, 36 insertions(+)


Index: llvm/test/Transforms/InstCombine/store-merge.ll
diff -c /dev/null llvm/test/Transforms/InstCombine/store-merge.ll:1.1
*** /dev/null   Sat Apr 14 20:00:47 2007
--- llvm/test/Transforms/InstCombine/store-merge.ll Sat Apr 14 20:00:37 2007
***
*** 0 
--- 1,36 
+ ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep {ret i32 
%storemerge} | wc -l | grep 2
+ ;; Simple sinking tests
+ 
+ ; "if then else"
+ define i32 @test1(i1 %C) {
+   %A = alloca i32
+ br i1 %C, label %Cond, label %Cond2
+ 
+ Cond:
+ store i32 -987654321, i32* %A
+ br label %Cont
+ 
+ Cond2:
+   store i32 47, i32* %A
+   br label %Cont
+ 
+ Cont:
+   %V = load i32* %A
+   ret i32 %V
+ }
+ 
+ ; "if then"
+ define i32 @test2(i1 %C) {
+   %A = alloca i32
+   store i32 47, i32* %A
+ br i1 %C, label %Cond, label %Cont
+ 
+ Cond:
+ store i32 -987654321, i32* %A
+ br label %Cont
+ 
+ Cont:
+   %V = load i32* %A
+   ret i32 %V
+ }
+ 



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


[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

2007-04-14 Thread Chris Lattner


Changes in directory llvm/lib/Transforms/Scalar:

InstructionCombining.cpp updated: 1.747 -> 1.748
---
Log message:

Extend store merging to support the 'if/then' version in addition to 
if/then/else.

This sinks the two stores in this example into a single store in cond_next.  In 
this
case, it allows elimination of the load as well:

store double 0.00e+00, double* @s.3060
%tmp3 = fcmp ogt double %tmp1, 5.00e-01 ;  [#uses=1]
br i1 %tmp3, label %cond_true, label %cond_next
cond_true:  ; preds = %entry
store double 1.00e+00, double* @s.3060
br label %cond_next
cond_next:  ; preds = %entry, %cond_true
%tmp6 = load double* @s.3060;  [#uses=1]

This implements Transforms/InstCombine/store-merge.ll:test2



---
Diffs of the changes:  (+60 -26)

 InstructionCombining.cpp |   86 ---
 1 files changed, 60 insertions(+), 26 deletions(-)


Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.747 
llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.748
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.747   Sat Apr 14 
19:07:55 2007
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Sat Apr 14 20:02:18 2007
@@ -8830,64 +8830,98 @@
 ///   if () { *P = v1; } else { *P = v2 }
 /// into a phi node with a store in the successor.
 ///
+/// Simplify things like:
+///   *P = v1; if () { *P = v2; }
+/// into a phi node with a store in the successor.
+///
 bool InstCombiner::SimplifyStoreAtEndOfBlock(StoreInst &SI) {
   BasicBlock *StoreBB = SI.getParent();
   
   // Check to see if the successor block has exactly two incoming edges.  If
   // so, see if the other predecessor contains a store to the same location.
   // if so, insert a PHI node (if needed) and move the stores down.
-  BasicBlock *Dest = StoreBB->getTerminator()->getSuccessor(0);
+  BasicBlock *DestBB = StoreBB->getTerminator()->getSuccessor(0);
   
   // Determine whether Dest has exactly two predecessors and, if so, compute
   // the other predecessor.
-  pred_iterator PI = pred_begin(Dest);
-  BasicBlock *Other = 0;
+  pred_iterator PI = pred_begin(DestBB);
+  BasicBlock *OtherBB = 0;
   if (*PI != StoreBB)
-Other = *PI;
+OtherBB = *PI;
   ++PI;
-  if (PI == pred_end(Dest))
+  if (PI == pred_end(DestBB))
 return false;
   
   if (*PI != StoreBB) {
-if (Other)
+if (OtherBB)
   return false;
-Other = *PI;
+OtherBB = *PI;
   }
-  if (++PI != pred_end(Dest))
+  if (++PI != pred_end(DestBB))
 return false;
   
   
-  BasicBlock::iterator BBI = Other->getTerminator();
+  // Verify that the other block ends in a branch and is not otherwise empty.
+  BasicBlock::iterator BBI = OtherBB->getTerminator();
   BranchInst *OtherBr = dyn_cast(BBI);
-  
-  // Make sure this other block ends in an unconditional branch and that
-  // there is an instruction before the branch.
-  if (!OtherBr || !cast(BBI)->isUnconditional() ||
-  BBI == Other->begin())
+  if (!OtherBr || BBI == OtherBB->begin())
 return false;
   
-  // See if the last instruction in other block is a store to the same 
location.
-  --BBI;
-  StoreInst *OtherStore = dyn_cast(BBI);
-  
-  // If this instruction is a store to the same location.
-  if (!OtherStore || OtherStore->getOperand(1) != SI.getOperand(1))
-return false;
+  // If the other block ends in an unconditional branch, check for the 'if then
+  // else' case.  there is an instruction before the branch.
+  StoreInst *OtherStore = 0;
+  if (OtherBr->isUnconditional()) {
+// If this isn't a store, or isn't a store to the same location, bail out.
+--BBI;
+OtherStore = dyn_cast(BBI);
+if (!OtherStore || OtherStore->getOperand(1) != SI.getOperand(1))
+  return false;
+  } else {
+// Otherwise, the other block ended with a conditional branch.  If one of 
the
+// destinations is StoreBB, then we have the if/then case.
+if (OtherBr->getSuccessor(0) != StoreBB && 
+OtherBr->getSuccessor(1) != StoreBB)
+  return false;
+
+// Okay, we know that OtherBr now goes to Dest and StoreBB, so this is an
+// if/then triangle.  See if there is a store to the same ptr as SI that 
lives
+// in OtherBB.
+for (;; --BBI) {
+  // Check to see if we find the matching store.
+  if ((OtherStore = dyn_cast(BBI))) {
+if (OtherStore->getOperand(1) != SI.getOperand(1))
+  return false;
+break;
+  }
+  // If we find something that may be using the stored value, or if we run 
out
+  // of instructions, we can't do the xform.
+  if (isa(BBI) || BBI->mayWriteToMemory() ||
+  BBI == OtherBB->begin())
+return false;
+}
+
+// In order to eliminate the store in OtherBr, we have to
+// make sure nothing reads the stored value in StoreBB.
+for (BasicBlock::iterator I 

[llvm-commits] CVS: llvm/test/CFrontend/2007-04-14-FNoBuiltin.c

2007-04-14 Thread Dale Johannesen


Changes in directory llvm/test/CFrontend:

2007-04-14-FNoBuiltin.c updated: 1.1 -> 1.2
---
Log message:

adjust per review comments


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

 2007-04-14-FNoBuiltin.c |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/test/CFrontend/2007-04-14-FNoBuiltin.c
diff -u llvm/test/CFrontend/2007-04-14-FNoBuiltin.c:1.1 
llvm/test/CFrontend/2007-04-14-FNoBuiltin.c:1.2
--- llvm/test/CFrontend/2007-04-14-FNoBuiltin.c:1.1 Sat Apr 14 19:18:30 2007
+++ llvm/test/CFrontend/2007-04-14-FNoBuiltin.c Sat Apr 14 21:40:12 2007
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc -S %s -O2 -fno-builtin -o - | llvm-as -f | llc | grep -v puts
+// RUN: %llvmgcc -S %s -O2 -fno-builtin -o - | grep call.*printf
 // Check that -fno-builtin is honored.
 
 extern int printf(const char*, ...);



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


[llvm-commits] CVS: llvm/test/C++Frontend/2007-04-14-FNoBuiltin.cpp

2007-04-14 Thread Dale Johannesen


Changes in directory llvm/test/C++Frontend:

2007-04-14-FNoBuiltin.cpp updated: 1.1 -> 1.2
---
Log message:

adjust per review comments


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

 2007-04-14-FNoBuiltin.cpp |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/test/C++Frontend/2007-04-14-FNoBuiltin.cpp
diff -u llvm/test/C++Frontend/2007-04-14-FNoBuiltin.cpp:1.1 
llvm/test/C++Frontend/2007-04-14-FNoBuiltin.cpp:1.2
--- llvm/test/C++Frontend/2007-04-14-FNoBuiltin.cpp:1.1 Sat Apr 14 19:18:31 2007
+++ llvm/test/C++Frontend/2007-04-14-FNoBuiltin.cpp Sat Apr 14 21:40:12 2007
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc -S %s -O2 -fno-builtin -o - | llvm-as -f | llc | grep -v puts
+// RUN: %llvmgcc -S %s -O2 -fno-builtin -o - | grep call.*printf
 // Check that -fno-builtin is honored.
 
 extern "C" int printf(const char*, ...);



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


[llvm-commits] CVS: llvm/test/Transforms/InstCombine/store-merge.ll

2007-04-14 Thread Jeff Cohen


Changes in directory llvm/test/Transforms/InstCombine:

store-merge.ll updated: 1.1 -> 1.2
---
Log message:

Patch supplied by gabor.

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

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


Index: llvm/test/Transforms/InstCombine/store-merge.ll
diff -u llvm/test/Transforms/InstCombine/store-merge.ll:1.1 
llvm/test/Transforms/InstCombine/store-merge.ll:1.2
--- llvm/test/Transforms/InstCombine/store-merge.ll:1.1 Sat Apr 14 20:00:37 2007
+++ llvm/test/Transforms/InstCombine/store-merge.ll Sat Apr 14 22:09:23 2007
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep {ret i32 %storemerge} 
| wc -l | grep 2
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep {ret i32 
\045storemerge} | wc -l | grep 2
 ;; Simple sinking tests
 
 ; "if then else"



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


[llvm-commits] CVS: llvm/test/Transforms/InstCombine/store-merge.ll

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Transforms/InstCombine:

store-merge.ll updated: 1.2 -> 1.3
---
Log message:

Keep lines a reasonable length.


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

 store-merge.ll |3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)


Index: llvm/test/Transforms/InstCombine/store-merge.ll
diff -u llvm/test/Transforms/InstCombine/store-merge.ll:1.2 
llvm/test/Transforms/InstCombine/store-merge.ll:1.3
--- llvm/test/Transforms/InstCombine/store-merge.ll:1.2 Sat Apr 14 22:09:23 2007
+++ llvm/test/Transforms/InstCombine/store-merge.ll Sat Apr 14 23:54:53 2007
@@ -1,4 +1,5 @@
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep {ret i32 
\045storemerge} | wc -l | grep 2
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | \
+; RUN:grep {ret i32 \045storemerge} | wc -l | grep 2
 ;; Simple sinking tests
 
 ; "if then else"



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


[llvm-commits] CVS: llvm/test/lib/llvm.exp

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/lib:

llvm.exp updated: 1.6 -> 1.7
---
Log message:

Allow replacement of %% with % 


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

 llvm.exp |2 ++
 1 files changed, 2 insertions(+)


Index: llvm/test/lib/llvm.exp
diff -u llvm/test/lib/llvm.exp:1.6 llvm/test/lib/llvm.exp:1.7
--- llvm/test/lib/llvm.exp:1.6  Sat Apr 14 17:50:08 2007
+++ llvm/test/lib/llvm.exp  Sat Apr 14 23:57:03 2007
@@ -68,6 +68,8 @@
   regsub -all {%s} $new_line $test new_line
   #replace %t with temp filenames
   regsub -all {%t} $new_line [file join Output $tmpFile] new_line
+  #replace %% with %
+  regsub -all {%%} $new_line % new_line
   return $new_line
 }
 



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


[llvm-commits] CVS: llvm/test/Transforms/TailDup/dg.exp if-tail-dup.ll

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Transforms/TailDup:

dg.exp updated: 1.4 -> 1.5
if-tail-dup.ll updated: 1.2 -> 1.3
---
Log message:

For PR1319: http://llvm.org/PR1319 :
Conver to new test system.


---
Diffs of the changes:  (+7 -4)

 dg.exp |4 ++--
 if-tail-dup.ll |7 +--
 2 files changed, 7 insertions(+), 4 deletions(-)


Index: llvm/test/Transforms/TailDup/dg.exp
diff -u llvm/test/Transforms/TailDup/dg.exp:1.4 
llvm/test/Transforms/TailDup/dg.exp:1.5
--- llvm/test/Transforms/TailDup/dg.exp:1.4 Wed Apr 11 14:56:59 2007
+++ llvm/test/Transforms/TailDup/dg.exp Sat Apr 14 23:59:55 2007
@@ -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}]]


Index: llvm/test/Transforms/TailDup/if-tail-dup.ll
diff -u llvm/test/Transforms/TailDup/if-tail-dup.ll:1.2 
llvm/test/Transforms/TailDup/if-tail-dup.ll:1.3
--- llvm/test/Transforms/TailDup/if-tail-dup.ll:1.2 Fri Dec  1 22:23:10 2006
+++ llvm/test/Transforms/TailDup/if-tail-dup.ll Sat Apr 14 23:59:55 2007
@@ -1,5 +1,8 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -tailduplicate | llc -march=x86 | 
grep 'je ' &&
-; RUN: llvm-upgrade < %s | llvm-as | opt -tailduplicate | llc -march=x86 | not 
grep jmp
+; RUN: llvm-upgrade < %s | llvm-as | opt -tailduplicate | llc -march=x86 | \
+; RUN:grep {je } &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -tailduplicate | llc -march=x86 | \
+; RUN:not grep jmp
+; END.
 ; This should have no unconditional jumps in it.  The C source is:
 
 ;void foo(int c, int* P) {



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


[llvm-commits] CVS: llvm/test/Transforms/TailCallElim/dg.exp dont-tce-tail-marked-call.ll move_alloca_for_tail_call.ll trivial_codegen_tailcall.ll

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Transforms/TailCallElim:

dg.exp updated: 1.4 -> 1.5
dont-tce-tail-marked-call.ll updated: 1.4 -> 1.5
move_alloca_for_tail_call.ll updated: 1.4 -> 1.5
trivial_codegen_tailcall.ll updated: 1.3 -> 1.4
---
Log message:

For PR1319: http://llvm.org/PR1319 :
Conver to new test system.


---
Diffs of the changes:  (+6 -5)

 dg.exp   |4 ++--
 dont-tce-tail-marked-call.ll |2 +-
 move_alloca_for_tail_call.ll |2 +-
 trivial_codegen_tailcall.ll  |3 ++-
 4 files changed, 6 insertions(+), 5 deletions(-)


Index: llvm/test/Transforms/TailCallElim/dg.exp
diff -u llvm/test/Transforms/TailCallElim/dg.exp:1.4 
llvm/test/Transforms/TailCallElim/dg.exp:1.5
--- llvm/test/Transforms/TailCallElim/dg.exp:1.4Wed Apr 11 14:56:59 2007
+++ llvm/test/Transforms/TailCallElim/dg.expSun Apr 15 00:03:58 2007
@@ -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}]]


Index: llvm/test/Transforms/TailCallElim/dont-tce-tail-marked-call.ll
diff -u llvm/test/Transforms/TailCallElim/dont-tce-tail-marked-call.ll:1.4 
llvm/test/Transforms/TailCallElim/dont-tce-tail-marked-call.ll:1.5
--- llvm/test/Transforms/TailCallElim/dont-tce-tail-marked-call.ll:1.4  Fri Jan 
26 02:25:06 2007
+++ llvm/test/Transforms/TailCallElim/dont-tce-tail-marked-call.ll  Sun Apr 
15 00:03:58 2007
@@ -1,5 +1,5 @@
 ; RUN: llvm-upgrade < %s | llvm-as | opt -tailcallelim | llvm-dis | \
-; RUN:grep 'call i32 @foo'
+; RUN:grep {call i32 @foo}
 
 declare void %bar(int*)
 int %foo(uint %N) {


Index: llvm/test/Transforms/TailCallElim/move_alloca_for_tail_call.ll
diff -u llvm/test/Transforms/TailCallElim/move_alloca_for_tail_call.ll:1.4 
llvm/test/Transforms/TailCallElim/move_alloca_for_tail_call.ll:1.5
--- llvm/test/Transforms/TailCallElim/move_alloca_for_tail_call.ll:1.4  Fri Jan 
26 02:25:06 2007
+++ llvm/test/Transforms/TailCallElim/move_alloca_for_tail_call.ll  Sun Apr 
15 00:03:58 2007
@@ -1,5 +1,5 @@
 ; RUN: llvm-upgrade < %s | llvm-as | opt -tailcallelim | llvm-dis | \
-; RUN:%prcontext alloca 1 | grep 'i32 @foo'
+; RUN:$prcontext alloca 1 | grep {i32 @foo}
 
 declare void %bar(int*)
 int %foo() {


Index: llvm/test/Transforms/TailCallElim/trivial_codegen_tailcall.ll
diff -u llvm/test/Transforms/TailCallElim/trivial_codegen_tailcall.ll:1.3 
llvm/test/Transforms/TailCallElim/trivial_codegen_tailcall.ll:1.4
--- llvm/test/Transforms/TailCallElim/trivial_codegen_tailcall.ll:1.3   Fri Jan 
26 02:25:06 2007
+++ llvm/test/Transforms/TailCallElim/trivial_codegen_tailcall.ll   Sun Apr 
15 00:03:58 2007
@@ -1,4 +1,5 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -tailcallelim | llvm-dis | grep 'tail 
call void @foo'
+; RUN: llvm-upgrade < %s | llvm-as | opt -tailcallelim | llvm-dis | \
+; RUN:grep {tail call void @foo}
 
 declare void %foo()
 



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


[llvm-commits] CVS: llvm/test/Transforms/SimplifyLibCalls/2007-04-06-strchr-miscompile.ll ExitInMain.ll IsDigit.ll MemSet.ll Pow.ll dg.exp floor.ll

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Transforms/SimplifyLibCalls:

2007-04-06-strchr-miscompile.ll updated: 1.1 -> 1.2
ExitInMain.ll updated: 1.3 -> 1.4
IsDigit.ll updated: 1.4 -> 1.5
MemSet.ll updated: 1.3 -> 1.4
Pow.ll updated: 1.5 -> 1.6
dg.exp updated: 1.3 -> 1.4
floor.ll updated: 1.4 -> 1.5
---
Log message:

For PR1319: http://llvm.org/PR1319 :
Convert to new test system. This exposes IsDigit.ll as failing.


---
Diffs of the changes:  (+36 -23)

 2007-04-06-strchr-miscompile.ll |9 +
 ExitInMain.ll   |4 +++-
 IsDigit.ll  |3 ++-
 MemSet.ll   |   16 +---
 Pow.ll  |5 +++--
 dg.exp  |4 ++--
 floor.ll|   18 --
 7 files changed, 36 insertions(+), 23 deletions(-)


Index: llvm/test/Transforms/SimplifyLibCalls/2007-04-06-strchr-miscompile.ll
diff -u 
llvm/test/Transforms/SimplifyLibCalls/2007-04-06-strchr-miscompile.ll:1.1 
llvm/test/Transforms/SimplifyLibCalls/2007-04-06-strchr-miscompile.ll:1.2
--- llvm/test/Transforms/SimplifyLibCalls/2007-04-06-strchr-miscompile.ll:1.1   
Fri Apr  6 18:36:59 2007
+++ llvm/test/Transforms/SimplifyLibCalls/2007-04-06-strchr-miscompile.ll   
Sun Apr 15 00:16:38 2007
@@ -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 [EMAIL PROTECTED],.*i64 3} %t
+; RUN: grep [EMAIL PROTECTED],.*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"


Index: llvm/test/Transforms/SimplifyLibCalls/ExitInMain.ll
diff -u llvm/test/Transforms/SimplifyLibCalls/ExitInMain.ll:1.3 
llvm/test/Transforms/SimplifyLibCalls/ExitInMain.ll:1.4
--- llvm/test/Transforms/SimplifyLibCalls/ExitInMain.ll:1.3 Sun Dec 31 
00:02:00 2006
+++ llvm/test/Transforms/SimplifyLibCalls/ExitInMain.ll Sun Apr 15 00:16:38 2007
@@ -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)


Index: llvm/test/Transforms/SimplifyLibCalls/IsDigit.ll
diff -u llvm/test/Transforms/SimplifyLibCalls/IsDigit.ll:1.4 
llvm/test/Transforms/SimplifyLibCalls/IsDigit.ll:1.5
--- llvm/test/Transforms/SimplifyLibCalls/IsDigit.ll:1.4Fri Dec  1 
22:23:10 2006
+++ llvm/test/Transforms/SimplifyLibCalls/IsDigit.llSun Apr 15 00:16:38 2007
@@ -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)


Index: llvm/test/Transforms/SimplifyLibCalls/MemSet.ll
diff -u llvm/test/Transforms/SimplifyLibCalls/MemSet.ll:1.3 
llvm/test/Transforms/SimplifyLibCalls/MemSet.ll:1.4
--- llvm/test/Transforms/SimplifyLibCalls/MemSet.ll:1.3 Fri Dec  1 22:23:10 2006
+++ llvm/test/Transforms/SimplifyLibCalls/MemSet.ll Sun Apr 15 00:16:38 2007
@@ -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
 }


Index: llvm/test/Transforms/SimplifyLibCalls/Pow.ll
diff -u llvm/test/Transforms/SimplifyLibCalls/Pow.ll:1.5 
llvm/test/Transforms/SimplifyLibCalls/Pow.ll:1.6
--- llvm/test/Transforms/SimplifyLibCalls/Pow.l

[llvm-commits] CVS: llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp

2007-04-14 Thread Chris Lattner


Changes in directory llvm/lib/Transforms/IPO:

SimplifyLibCalls.cpp updated: 1.111 -> 1.112
---
Log message:

fix SimplifyLibCalls/IsDigit.ll


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

 SimplifyLibCalls.cpp |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp
diff -u llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.111 
llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.112
--- llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.111  Fri Apr 13 20:17:48 2007
+++ llvm/lib/Transforms/IPO/SimplifyLibCalls.cppSun Apr 15 00:38:40 2007
@@ -1571,7 +1571,7 @@
   ConstantInt::get(V->getType(), 128), 
   V->getName()+".isascii", CI);
 if (Cmp->getType() != CI->getType())
-  Cmp = new BitCastInst(Cmp, CI->getType(), Cmp->getName(), CI);
+  Cmp = new ZExtInst(Cmp, CI->getType(), Cmp->getName(), CI);
 return ReplaceCallWith(CI, Cmp);
   }
 } isasciiOptimizer;



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


[llvm-commits] CVS: llvm/test/Transforms/InstCombine/apint-binop-cast.ll

2007-04-14 Thread LLVM


Changes in directory llvm/test/Transforms/InstCombine:

apint-binop-cast.ll (r1.3) removed
---
Log message:

This test case is incorrect. Remove it.


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

 0 files changed



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


[llvm-commits] CVS: llvm/Makefile

2007-04-14 Thread Reid Spencer


Changes in directory llvm:

Makefile updated: 1.71 -> 1.72
---
Log message:

Add a new testing target: check-one. It is used like this:

make check-one TESTONE=test/path/to/test.ll

This runs a single check in exactly the same way that dejagnu runs it.


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

 Makefile |3 +++
 1 files changed, 3 insertions(+)


Index: llvm/Makefile
diff -u llvm/Makefile:1.71 llvm/Makefile:1.72
--- llvm/Makefile:1.71  Thu Mar 29 13:14:00 2007
+++ llvm/Makefile   Sun Apr 15 01:18:50 2007
@@ -113,6 +113,9 @@
 check-llvm2cpp:
$(MAKE) check TESTSUITE=Feature RUNLLVM2CPP=1
 
+check-one:
+   $(MAKE) -C test check-one TESTONE=$(TESTONE)
+
 srpm: $(LLVM_OBJ_ROOT)/llvm.spec 
rpmbuild -bs $(LLVM_OBJ_ROOT)/llvm.spec
 



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


[llvm-commits] CVS: llvm/test/Makefile

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test:

Makefile updated: 1.96 -> 1.97
---
Log message:

Add a new testing target: check-one. It is used like this:

make check-one TESTONE=test/path/to/test.ll

This runs a single check in exactly the same way that dejagnu runs it.


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

 Makefile |   19 +++
 1 files changed, 19 insertions(+)


Index: llvm/test/Makefile
diff -u llvm/test/Makefile:1.96 llvm/test/Makefile:1.97
--- llvm/test/Makefile:1.96 Wed Apr 11 21:49:30 2007
+++ llvm/test/Makefile  Sun Apr 15 01:18:50 2007
@@ -42,6 +42,25 @@
@echo "*** dejagnu not found.  Make sure runtest is in your PATH, then 
reconfigure llvm."
 endif
 
+ifdef TESTONE
+CLEANED_TESTONE := $(patsubst %/,%,$(TESTONE))
+CLEANED_TESTONE := $(patsubst test/%,%,$(CLEANED_TESTONE))
+SUBDIR := $(shell dirname $(CLEANED_TESTONE))
+TESTPATH := $(LLVM_SRC_ROOT)/test/$(CLEANED_TESTONE)
+check-one: site.exp $(TCLSH)
+   @( echo "source $(LLVM_SRC_ROOT)/test/site.exp" ; \
+ echo "set subdir $(SUBDIR)" ; \
+ echo "proc pass  { msg } { puts \"PASS: \$$msg\" } "; \
+ echo "proc fail  { msg } { puts \"FAIL: \$$msg\" }" ; \
+ echo "proc xfail { msg } { puts \"XFAIL: \$$msg\" }" ; \
+ echo "proc xpass { msg } { puts \"XPASS: \$$msg\" }" ; \
+ echo "source $(LLVM_SRC_ROOT)/test/lib/llvm.exp" ; \
+ echo "RunLLVMTests $(TESTPATH)" ) | \
+   ( ulimit -t 600 ; ulimit -d 512000 ; \
+ PATH="$(LLVMToolDir):$(LLVM_SRC_ROOT)/test/Scripts:$(PATH)" \
+ $(TCLSH) )
+endif
+
 clean::
$(RM) -rf `find $(LLVM_OBJ_ROOT)/test -name Output -type d -print`
 



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


[llvm-commits] CVS: llvm/Makefile

2007-04-14 Thread Reid Spencer


Changes in directory llvm:

Makefile updated: 1.72 -> 1.73
---
Log message:

Echo command lines only if the user wants them.


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

 Makefile |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/Makefile
diff -u llvm/Makefile:1.72 llvm/Makefile:1.73
--- llvm/Makefile:1.72  Sun Apr 15 01:18:50 2007
+++ llvm/Makefile   Sun Apr 15 01:22:48 2007
@@ -111,10 +111,10 @@
 endif
 
 check-llvm2cpp:
-   $(MAKE) check TESTSUITE=Feature RUNLLVM2CPP=1
+   $(Verb)$(MAKE) check TESTSUITE=Feature RUNLLVM2CPP=1
 
 check-one:
-   $(MAKE) -C test check-one TESTONE=$(TESTONE)
+   $(Verb)$(MAKE) -C test check-one TESTONE=$(TESTONE)
 
 srpm: $(LLVM_OBJ_ROOT)/llvm.spec 
rpmbuild -bs $(LLVM_OBJ_ROOT)/llvm.spec



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


[llvm-commits] CVS: llvm/test/Makefile

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test:

Makefile updated: 1.97 -> 1.98
---
Log message:

Echo command lines only if the user wants them.


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

 Makefile |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/test/Makefile
diff -u llvm/test/Makefile:1.97 llvm/test/Makefile:1.98
--- llvm/test/Makefile:1.97 Sun Apr 15 01:18:50 2007
+++ llvm/test/Makefile  Sun Apr 15 01:22:48 2007
@@ -48,7 +48,7 @@
 SUBDIR := $(shell dirname $(CLEANED_TESTONE))
 TESTPATH := $(LLVM_SRC_ROOT)/test/$(CLEANED_TESTONE)
 check-one: site.exp $(TCLSH)
-   @( echo "source $(LLVM_SRC_ROOT)/test/site.exp" ; \
+   $(Verb)( echo "source $(LLVM_SRC_ROOT)/test/site.exp" ; \
  echo "set subdir $(SUBDIR)" ; \
  echo "proc pass  { msg } { puts \"PASS: \$$msg\" } "; \
  echo "proc fail  { msg } { puts \"FAIL: \$$msg\" }" ; \



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


[llvm-commits] CVS: llvm/test/TestRunner.sh

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test:

TestRunner.sh updated: 1.15 -> 1.16
---
Log message:

Reimplement in terms of the support for this feature in the makefiles with
the "check-one" target. This was necessitated by the change in the test
harness to fully use Tcl's "exec" function and avoid shell scripts 
altogether. Consequently, to be accurate, TestRunner.sh needs to invoke the
same environment as dejagnu would, but for just a single test. That's what
the make target "check-one" does so we just invoke it here.


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

 TestRunner.sh |   37 +
 1 files changed, 1 insertion(+), 36 deletions(-)


Index: llvm/test/TestRunner.sh
diff -u llvm/test/TestRunner.sh:1.15 llvm/test/TestRunner.sh:1.16
--- llvm/test/TestRunner.sh:1.15Sun Apr  8 02:58:41 2007
+++ llvm/test/TestRunner.sh Sun Apr 15 01:25:12 2007
@@ -12,39 +12,4 @@
 # %llvmgxx - llvm-g++ command
 # %prcontext - prcontext.tcl script
 #
-
-FILENAME=$1
-TESTNAME=$1
-SUBST=$1
-FILENAME_ONLY=`basename $1`
-OUTPUT=Output/$FILENAME_ONLY.out
-
-# create the output directory if it does not already exist
-mkdir Output > /dev/null 2>&1
-
-if test $# != 1; then
-  # If more than one parameter is passed in, there must be three parameters:
-  # The filename to read from (already processed), the command used to execute,
-  # and the file to output to.
-  SUBST=$2
-  OUTPUT=$3
-  TESTNAME=$3
-fi
-
-ulimit -t 40
-
-SCRIPT=$OUTPUT.script
-grep 'RUN:' $FILENAME | sed 
"s|^.*RUN:\(.*\)$|\1|g;s|%s|$SUBST|g;s|%llvmgcc|llvm-gcc 
-emit-llvm|g;s|%llvmgxx|llvm-g++ -emit-llvm|g;s|%prcontext|prcontext.tcl|g" > 
$SCRIPT
-
-grep -q XFAIL $FILENAME && (printf "XFAILED '$TESTNAME': "; grep XFAIL 
$FILENAME)
-
-/bin/sh $SCRIPT > $OUTPUT 2>&1 || (
-  echo " TEST '$TESTNAME' FAILED! "
-  echo "Command: "
-  cat $SCRIPT
-  echo "Output:"
-  cat $OUTPUT
-  rm $OUTPUT
-  echo " TEST '$TESTNAME' FAILED! "
-)
-
+make check-one TESTONE=$1



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


[llvm-commits] CVS: llvm/test/TestRunner.sh

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test:

TestRunner.sh updated: 1.16 -> 1.17
---
Log message:

Make it possible to run this from within subdirectories of llvm/test


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

 TestRunner.sh |   19 ++-
 1 files changed, 18 insertions(+), 1 deletion(-)


Index: llvm/test/TestRunner.sh
diff -u llvm/test/TestRunner.sh:1.16 llvm/test/TestRunner.sh:1.17
--- llvm/test/TestRunner.sh:1.16Sun Apr 15 01:25:12 2007
+++ llvm/test/TestRunner.sh Sun Apr 15 01:47:49 2007
@@ -12,4 +12,21 @@
 # %llvmgxx - llvm-g++ command
 # %prcontext - prcontext.tcl script
 #
-make check-one TESTONE=$1
+TESTFILE=$1
+if test `dirname $TESTFILE` == . ; then
+  TESTPATH=`pwd`
+  SUBDIR=""
+  while test `basename $TESTPATH` != "test" -a ! -z "$TESTPATH" ; do
+tmp=`basename $TESTPATH`
+SUBDIR="$tmp/$SUBDIR"
+TESTPATH=`dirname $TESTPATH`
+  done
+  if test -d "$TESTPATH" ; then
+cd $TESTPATH
+make check-one TESTONE="$SUBDIR$TESTFILE"
+  else
+echo "Can't find llvm/test directory in " `pwd`
+  fi
+else
+  make check-one TESTONE=$TESTFILE
+fi



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


[llvm-commits] CVS: llvm/test/Transforms/ArgumentPromotion/control-flow.ll control-flow2.ll dg.exp

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Transforms/ArgumentPromotion:

control-flow.ll updated: 1.2 -> 1.3
control-flow2.ll updated: 1.3 -> 1.4
dg.exp updated: 1.4 -> 1.5
---
Log message:

PR1319: http://llvm.org/PR1319 :
Upgrade tests to new Tcl exec based test harness requirements.


---
Diffs of the changes:  (+6 -4)

 control-flow.ll  |3 ++-
 control-flow2.ll |3 ++-
 dg.exp   |4 ++--
 3 files changed, 6 insertions(+), 4 deletions(-)


Index: llvm/test/Transforms/ArgumentPromotion/control-flow.ll
diff -u llvm/test/Transforms/ArgumentPromotion/control-flow.ll:1.2 
llvm/test/Transforms/ArgumentPromotion/control-flow.ll:1.3
--- llvm/test/Transforms/ArgumentPromotion/control-flow.ll:1.2  Fri Dec  1 
22:23:08 2006
+++ llvm/test/Transforms/ArgumentPromotion/control-flow.ll  Sun Apr 15 
01:51:14 2007
@@ -1,4 +1,5 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -argpromotion | llvm-dis | not grep 
'load int\* null'
+; RUN: llvm-upgrade < %s | llvm-as | opt -argpromotion | llvm-dis | \
+; RUN:not grep {load int\* null}
 
 implementation
 


Index: llvm/test/Transforms/ArgumentPromotion/control-flow2.ll
diff -u llvm/test/Transforms/ArgumentPromotion/control-flow2.ll:1.3 
llvm/test/Transforms/ArgumentPromotion/control-flow2.ll:1.4
--- llvm/test/Transforms/ArgumentPromotion/control-flow2.ll:1.3 Sun Dec 31 
00:01:59 2006
+++ llvm/test/Transforms/ArgumentPromotion/control-flow2.ll Sun Apr 15 
01:51:14 2007
@@ -1,4 +1,5 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -argpromotion | llvm-dis | grep 'load 
i32\* %A'
+; RUN: llvm-upgrade < %s | llvm-as | opt -argpromotion | llvm-dis | \
+; RUN:   grep {load i32\\* %A}
 
 implementation
 


Index: llvm/test/Transforms/ArgumentPromotion/dg.exp
diff -u llvm/test/Transforms/ArgumentPromotion/dg.exp:1.4 
llvm/test/Transforms/ArgumentPromotion/dg.exp:1.5
--- llvm/test/Transforms/ArgumentPromotion/dg.exp:1.4   Wed Apr 11 14:56:58 2007
+++ llvm/test/Transforms/ArgumentPromotion/dg.exp   Sun Apr 15 01:51:14 2007
@@ -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}]]



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


[llvm-commits] CVS: llvm/test/Transforms/TailCallElim/move_alloca_for_tail_call.ll

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Transforms/TailCallElim:

move_alloca_for_tail_call.ll updated: 1.5 -> 1.6
---
Log message:

Use %prcontext, $prcontext is not resolving for some reason.


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

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


Index: llvm/test/Transforms/TailCallElim/move_alloca_for_tail_call.ll
diff -u llvm/test/Transforms/TailCallElim/move_alloca_for_tail_call.ll:1.5 
llvm/test/Transforms/TailCallElim/move_alloca_for_tail_call.ll:1.6
--- llvm/test/Transforms/TailCallElim/move_alloca_for_tail_call.ll:1.5  Sun Apr 
15 00:03:58 2007
+++ llvm/test/Transforms/TailCallElim/move_alloca_for_tail_call.ll  Sun Apr 
15 01:52:45 2007
@@ -1,5 +1,5 @@
 ; RUN: llvm-upgrade < %s | llvm-as | opt -tailcallelim | llvm-dis | \
-; RUN:$prcontext alloca 1 | grep {i32 @foo}
+; RUN:%prcontext alloca 1 | grep {i32 @foo}
 
 declare void %bar(int*)
 int %foo() {



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


[llvm-commits] CVS: llvm/test/Transforms/ConstantMerge/dg.exp

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Transforms/ConstantMerge:

dg.exp updated: 1.4 -> 1.5
---
Log message:

For PR1319: http://llvm.org/PR1319 :
Upgrade to use new Tcl exec based test harness


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

 dg.exp |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/test/Transforms/ConstantMerge/dg.exp
diff -u llvm/test/Transforms/ConstantMerge/dg.exp:1.4 
llvm/test/Transforms/ConstantMerge/dg.exp:1.5
--- llvm/test/Transforms/ConstantMerge/dg.exp:1.4   Wed Apr 11 14:56:58 2007
+++ llvm/test/Transforms/ConstantMerge/dg.exp   Sun Apr 15 01:53:51 2007
@@ -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}]]



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


[llvm-commits] CVS: llvm/test/Transforms/CondProp/basictest.ll dg.exp

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Transforms/CondProp:

basictest.ll updated: 1.2 -> 1.3
dg.exp updated: 1.3 -> 1.4
---
Log message:

For PR1319: http://llvm.org/PR1319 :
Upgrade to use new Tcl exec based test harness


---
Diffs of the changes:  (+4 -3)

 basictest.ll |3 ++-
 dg.exp   |4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)


Index: llvm/test/Transforms/CondProp/basictest.ll
diff -u llvm/test/Transforms/CondProp/basictest.ll:1.2 
llvm/test/Transforms/CondProp/basictest.ll:1.3
--- llvm/test/Transforms/CondProp/basictest.ll:1.2  Fri Dec  1 22:23:08 2006
+++ llvm/test/Transforms/CondProp/basictest.ll  Sun Apr 15 01:53:51 2007
@@ -1,4 +1,5 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -condprop | llvm-dis | not grep 'br 
label'
+; RUN: llvm-upgrade < %s | llvm-as | opt -condprop | llvm-dis | \
+; RUN:not grep {br label}
 
 int %test(bool %C) {
br bool %C, label %T1, label %F1


Index: llvm/test/Transforms/CondProp/dg.exp
diff -u llvm/test/Transforms/CondProp/dg.exp:1.3 
llvm/test/Transforms/CondProp/dg.exp:1.4
--- llvm/test/Transforms/CondProp/dg.exp:1.3Wed Apr 11 14:56:58 2007
+++ llvm/test/Transforms/CondProp/dg.expSun Apr 15 01:53:51 2007
@@ -1,3 +1,3 @@
-load_lib llvm-dg.exp
+load_lib llvm.exp
 
-llvm-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{ll}]]
+RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll}]]



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


[llvm-commits] CVS: llvm/test/Transforms/BlockPlacement/dg.exp

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Transforms/BlockPlacement:

dg.exp updated: 1.4 -> 1.5
---
Log message:

For PR1319: http://llvm.org/PR1319 :
Upgrade to use new Tcl exec based test harness


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

 dg.exp |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/test/Transforms/BlockPlacement/dg.exp
diff -u llvm/test/Transforms/BlockPlacement/dg.exp:1.4 
llvm/test/Transforms/BlockPlacement/dg.exp:1.5
--- llvm/test/Transforms/BlockPlacement/dg.exp:1.4  Wed Apr 11 14:56:58 2007
+++ llvm/test/Transforms/BlockPlacement/dg.exp  Sun Apr 15 01:53:51 2007
@@ -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}]]



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


[llvm-commits] CVS: llvm/test/Transforms/CodeExtractor/dg.exp

2007-04-14 Thread Reid Spencer


Changes in directory llvm/test/Transforms/CodeExtractor:

dg.exp updated: 1.4 -> 1.5
---
Log message:

For PR1319: http://llvm.org/PR1319 :
Upgrade to use new Tcl exec based test harness


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

 dg.exp |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/test/Transforms/CodeExtractor/dg.exp
diff -u llvm/test/Transforms/CodeExtractor/dg.exp:1.4 
llvm/test/Transforms/CodeExtractor/dg.exp:1.5
--- llvm/test/Transforms/CodeExtractor/dg.exp:1.4   Wed Apr 11 14:56:58 2007
+++ llvm/test/Transforms/CodeExtractor/dg.exp   Sun Apr 15 01:53:51 2007
@@ -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}]]



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