[llvm-commits] CVS: llvm/test/Regression/Transforms/LoopStrengthReduce/nested-reduce.ll share_code_in_preheader.ll use_postinc_value_outside_loop.ll var_stride_used_by_compare.ll

Reid Spencer reid at x10sys.com
Sat Dec 30 22:03:24 PST 2006



Changes in directory llvm/test/Regression/Transforms/LoopStrengthReduce:

nested-reduce.ll updated: 1.2 -> 1.3
share_code_in_preheader.ll updated: 1.2 -> 1.3
use_postinc_value_outside_loop.ll updated: 1.3 -> 1.4
var_stride_used_by_compare.ll updated: 1.2 -> 1.3
---
Log message:

For PR950: http://llvm.org/PR950 :
Update the test suite to accommodate the change from signed integer types
to signless integer types. The changes were of only a few kinds:

1. Make sure llvm-upgrade is run on the source which does the bulk of the
   changes automatically.

2. Change things like "grep 'int'" to "grep 'i32'"

3. In several tests bitcasting caused the same name to be reused in the
   same type plane. These had to be manually fixed. The fix was (generally)
   to leave the bitcast and provide the instruction with a new name. This
   should not affect the semantics of the test. In a few cases, the 
   bitcasts were known to be superfluous and irrelevant to the test case
   so they were removed.

4. One test case uses a bytecode file which needed to be updated to the
   latest bytecode format.



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

 nested-reduce.ll                  |    6 +++---
 share_code_in_preheader.ll        |   12 ++++++------
 use_postinc_value_outside_loop.ll |   10 +++++-----
 var_stride_used_by_compare.ll     |    8 ++++----
 4 files changed, 18 insertions(+), 18 deletions(-)


Index: llvm/test/Regression/Transforms/LoopStrengthReduce/nested-reduce.ll
diff -u llvm/test/Regression/Transforms/LoopStrengthReduce/nested-reduce.ll:1.2 llvm/test/Regression/Transforms/LoopStrengthReduce/nested-reduce.ll:1.3
--- llvm/test/Regression/Transforms/LoopStrengthReduce/nested-reduce.ll:1.2	Fri Dec  1 22:23:09 2006
+++ llvm/test/Regression/Transforms/LoopStrengthReduce/nested-reduce.ll	Sun Dec 31 00:01:59 2006
@@ -25,8 +25,8 @@
 	br label %no_exit.1
 
 no_exit.1:		; preds = %cond_continue, %no_exit.1.outer
-	%indvar = phi uint [ 0, %no_exit.1.outer ], [ %indvar.next, %cond_continue ]		; <uint> [#uses=2]
-	%indvar = cast uint %indvar to int		; <int> [#uses=1]
+	%indvar.ui = phi uint [ 0, %no_exit.1.outer ], [ %indvar.next, %cond_continue ]		; <uint> [#uses=2]
+	%indvar = cast uint %indvar.ui to int		; <int> [#uses=1]
 	%j.1.2 = add int %indvar, %j.1.2.ph		; <int> [#uses=2]
 	%tmp.11 = add int %j.1.2, %tmp.9		; <int> [#uses=1]
 	%tmp.12 = cast int %tmp.11 to ubyte		; <ubyte> [#uses=1]
@@ -43,7 +43,7 @@
 
 cond_continue:		; preds = %no_exit.1
 	%tmp.519 = setlt int %inc.1, %C		; <bool> [#uses=1]
-	%indvar.next = add uint %indvar, 1		; <uint> [#uses=1]
+	%indvar.next = add uint %indvar.ui, 1		; <uint> [#uses=1]
 	br bool %tmp.519, label %no_exit.1, label %loopexit.1
 
 loopexit.1:		; preds = %cond_continue, %cond_true, %loopentry.1


Index: llvm/test/Regression/Transforms/LoopStrengthReduce/share_code_in_preheader.ll
diff -u llvm/test/Regression/Transforms/LoopStrengthReduce/share_code_in_preheader.ll:1.2 llvm/test/Regression/Transforms/LoopStrengthReduce/share_code_in_preheader.ll:1.3
--- llvm/test/Regression/Transforms/LoopStrengthReduce/share_code_in_preheader.ll:1.2	Fri Dec  1 22:23:09 2006
+++ llvm/test/Regression/Transforms/LoopStrengthReduce/share_code_in_preheader.ll	Sun Dec 31 00:01:59 2006
@@ -1,17 +1,17 @@
 ; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | grep mul | wc -l | grep 1
 ; LSR should not make two copies of the Q*L expression in the preheader!
 
-sbyte %test(sbyte* %A, sbyte* %B, int %L, int %Q, int %N) {
+sbyte %test(sbyte* %A, sbyte* %B, int %L, int %Q, int %N.s) {
 entry:
 	%tmp.6 = mul int %Q, %L		; <int> [#uses=1]
-	%N = cast int %N to uint		; <uint> [#uses=1]
+	%N = cast int %N.s to uint		; <uint> [#uses=1]
 	br label %no_exit
 
 no_exit:		; preds = %no_exit, %no_exit.preheader
-	%indvar = phi uint [ 0, %entry], [ %indvar.next, %no_exit ]		; <uint> [#uses=2]
+	%indvar.ui = phi uint [ 0, %entry], [ %indvar.next, %no_exit ]		; <uint> [#uses=2]
 	%Sum.0.0 = phi sbyte [ 0, %entry], [ %tmp.21, %no_exit ]		; <sbyte> [#uses=1]
-	%indvar = cast uint %indvar to int		; <int> [#uses=1]
-	%N_addr.0.0 = sub int %N, %indvar		; <int> [#uses=1]
+	%indvar = cast uint %indvar.ui to int		; <int> [#uses=1]
+	%N_addr.0.0 = sub int %N.s, %indvar		; <int> [#uses=1]
 	%tmp.8 = add int %N_addr.0.0, %tmp.6		; <int> [#uses=2]
 	%tmp.9 = getelementptr sbyte* %A, int %tmp.8		; <sbyte*> [#uses=1]
 	%tmp.10 = load sbyte* %tmp.9		; <sbyte> [#uses=1]
@@ -19,7 +19,7 @@
 	%tmp.18 = load sbyte* %tmp.17		; <sbyte> [#uses=1]
 	%tmp.19 = sub sbyte %tmp.10, %tmp.18		; <sbyte> [#uses=1]
 	%tmp.21 = add sbyte %tmp.19, %Sum.0.0		; <sbyte> [#uses=2]
-	%indvar.next = add uint %indvar, 1		; <uint> [#uses=2]
+	%indvar.next = add uint %indvar.ui, 1		; <uint> [#uses=2]
 	%exitcond = seteq uint %indvar.next, %N		; <bool> [#uses=1]
 	br bool %exitcond, label %loopexit, label %no_exit
 


Index: llvm/test/Regression/Transforms/LoopStrengthReduce/use_postinc_value_outside_loop.ll
diff -u llvm/test/Regression/Transforms/LoopStrengthReduce/use_postinc_value_outside_loop.ll:1.3 llvm/test/Regression/Transforms/LoopStrengthReduce/use_postinc_value_outside_loop.ll:1.4
--- llvm/test/Regression/Transforms/LoopStrengthReduce/use_postinc_value_outside_loop.ll:1.3	Fri Dec  1 22:23:09 2006
+++ llvm/test/Regression/Transforms/LoopStrengthReduce/use_postinc_value_outside_loop.ll	Sun Dec 31 00:01:59 2006
@@ -1,4 +1,4 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | grep 'add uint %iv.*inc, 1'
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | grep 'add i32 %iv.*inc, 1'
 ;
 ; Make sure that the use of the IV outside of the loop (the store) uses the 
 ; post incremented value of the IV, not the preincremented value.  This 
@@ -13,13 +13,13 @@
         br label %no_exit.2
 
 no_exit.2:              ; preds = %no_exit.2, %then.0
-        %indvar630 = phi uint [ 0, %then.0 ], [ %indvar.next631, %no_exit.2 ]           ; <uint> [#uses=3]
-        %indvar630 = cast uint %indvar630 to int                ; <int> [#uses=1]
-        %tmp.38 = getelementptr [700 x int]* %nbeaux_.0__558, int 0, uint %indvar630            ; <int*> [#uses=1]
+        %indvar630.ui = phi uint [ 0, %then.0 ], [ %indvar.next631, %no_exit.2 ]           ; <uint> [#uses=3]
+        %indvar630 = cast uint %indvar630.ui to int                ; <int> [#uses=1]
+        %tmp.38 = getelementptr [700 x int]* %nbeaux_.0__558, int 0, uint %indvar630.ui            ; <int*> [#uses=1]
         store int 0, int* %tmp.38
         %inc.2 = add int %indvar630, 2          ; <int> [#uses=2]
         %tmp.34 = call bool %pred(int %indvar630)
-        %indvar.next631 = add uint %indvar630, 1                ; <uint> [#uses=1]
+        %indvar.next631 = add uint %indvar630.ui, 1                ; <uint> [#uses=1]
         br bool %tmp.34, label %no_exit.2, label %loopexit.2.loopexit
 
 loopexit.2.loopexit:            ; preds = %no_exit.2


Index: llvm/test/Regression/Transforms/LoopStrengthReduce/var_stride_used_by_compare.ll
diff -u llvm/test/Regression/Transforms/LoopStrengthReduce/var_stride_used_by_compare.ll:1.2 llvm/test/Regression/Transforms/LoopStrengthReduce/var_stride_used_by_compare.ll:1.3
--- llvm/test/Regression/Transforms/LoopStrengthReduce/var_stride_used_by_compare.ll:1.2	Fri Dec  1 22:23:09 2006
+++ llvm/test/Regression/Transforms/LoopStrengthReduce/var_stride_used_by_compare.ll	Sun Dec 31 00:01:59 2006
@@ -17,10 +17,10 @@
 
 implementation   ; Functions:
 
-void %foo(int %k, int %i) {
+void %foo(int %k, int %i.s) {
 entry:
-	%i = cast int %i to uint		; <uint> [#uses=2]
-	%k_addr.012 = shl int %i, ubyte 1		; <int> [#uses=1]
+	%i = cast int %i.s to uint		; <uint> [#uses=2]
+	%k_addr.012 = shl int %i.s, ubyte 1		; <int> [#uses=1]
 	%tmp14 = setgt int %k_addr.012, 8192		; <bool> [#uses=1]
 	br bool %tmp14, label %return, label %bb.preheader
 
@@ -35,7 +35,7 @@
 	%k_addr.0.0 = cast uint %tmp.16 to int		; <int> [#uses=1]
 	%tmp = getelementptr [8193 x sbyte]* %flags2, int 0, uint %tmp.16		; <sbyte*> [#uses=1]
 	store sbyte 0, sbyte* %tmp
-	%k_addr.0 = add int %k_addr.0.0, %i		; <int> [#uses=1]
+	%k_addr.0 = add int %k_addr.0.0, %i.s		; <int> [#uses=1]
 	%tmp = setgt int %k_addr.0, 8192		; <bool> [#uses=1]
 	%indvar.next = add uint %indvar, 1		; <uint> [#uses=1]
 	br bool %tmp, label %return.loopexit, label %bb






More information about the llvm-commits mailing list