aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/LoopStrengthReduce
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-12-31 06:02:00 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-12-31 06:02:00 +0000
commiteacb7020ec7b0a6a0078f1be7bfd77bf6fe1ff06 (patch)
treeac1b0bfa8c340bb02ac25f991a1ee28b216de458 /test/Transforms/LoopStrengthReduce
parent47857812e29324a9d1560796a05b53d3a9217fd9 (diff)
For 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32789 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/LoopStrengthReduce')
-rw-r--r--test/Transforms/LoopStrengthReduce/nested-reduce.ll6
-rw-r--r--test/Transforms/LoopStrengthReduce/share_code_in_preheader.ll12
-rw-r--r--test/Transforms/LoopStrengthReduce/use_postinc_value_outside_loop.ll10
-rw-r--r--test/Transforms/LoopStrengthReduce/var_stride_used_by_compare.ll8
4 files changed, 18 insertions, 18 deletions
diff --git a/test/Transforms/LoopStrengthReduce/nested-reduce.ll b/test/Transforms/LoopStrengthReduce/nested-reduce.ll
index 3caa366b06..1959832d51 100644
--- a/test/Transforms/LoopStrengthReduce/nested-reduce.ll
+++ b/test/Transforms/LoopStrengthReduce/nested-reduce.ll
@@ -25,8 +25,8 @@ no_exit.1.outer: ; preds = %cond_true, %no_exit.1.preheader
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_true: ; preds = %no_exit.1
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
diff --git a/test/Transforms/LoopStrengthReduce/share_code_in_preheader.ll b/test/Transforms/LoopStrengthReduce/share_code_in_preheader.ll
index ba897c401f..d8316a52bc 100644
--- a/test/Transforms/LoopStrengthReduce/share_code_in_preheader.ll
+++ b/test/Transforms/LoopStrengthReduce/share_code_in_preheader.ll
@@ -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 @@ no_exit: ; preds = %no_exit, %no_exit.preheader
%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
diff --git a/test/Transforms/LoopStrengthReduce/use_postinc_value_outside_loop.ll b/test/Transforms/LoopStrengthReduce/use_postinc_value_outside_loop.ll
index 4a6e9b2a13..028400c47f 100644
--- a/test/Transforms/LoopStrengthReduce/use_postinc_value_outside_loop.ll
+++ b/test/Transforms/LoopStrengthReduce/use_postinc_value_outside_loop.ll
@@ -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 @@ then.0:
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
diff --git a/test/Transforms/LoopStrengthReduce/var_stride_used_by_compare.ll b/test/Transforms/LoopStrengthReduce/var_stride_used_by_compare.ll
index 7b4f022aa3..3e8f63abe3 100644
--- a/test/Transforms/LoopStrengthReduce/var_stride_used_by_compare.ll
+++ b/test/Transforms/LoopStrengthReduce/var_stride_used_by_compare.ll
@@ -17,10 +17,10 @@ target triple = "i686-apple-darwin8"
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 @@ bb: ; preds = %bb, %bb.preheader
%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