aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/IndVarSimplify/loop_evaluate7.ll
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-06-24 14:46:22 +0000
committerDan Gohman <gohman@apple.com>2009-06-24 14:46:22 +0000
commite5aceed168799af9c109308e84c4845aa6fbe77a (patch)
tree4063a9e5a4a40386d090a0c304300a3ac4b52282 /test/Transforms/IndVarSimplify/loop_evaluate7.ll
parent32a81a3f6d75c5343e7df65ce5d228f2128ca943 (diff)
downloadexternal_llvm-e5aceed168799af9c109308e84c4845aa6fbe77a.zip
external_llvm-e5aceed168799af9c109308e84c4845aa6fbe77a.tar.gz
external_llvm-e5aceed168799af9c109308e84c4845aa6fbe77a.tar.bz2
Simplify [su]max(MAX, n) to MAX. This comes up in loop tripcount
computations in loops with multiple exits. Adjust the testcase for PR4436 so that the relevant portion isn't optimized away. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74073 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/IndVarSimplify/loop_evaluate7.ll')
-rw-r--r--test/Transforms/IndVarSimplify/loop_evaluate7.ll6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/Transforms/IndVarSimplify/loop_evaluate7.ll b/test/Transforms/IndVarSimplify/loop_evaluate7.ll
index bce65e0..6e31c55 100644
--- a/test/Transforms/IndVarSimplify/loop_evaluate7.ll
+++ b/test/Transforms/IndVarSimplify/loop_evaluate7.ll
@@ -4,7 +4,7 @@
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-f80:32:32"
target triple = "i386-pc-linux-gnu"
-define i8* @string_expandtabs() nounwind {
+define i8* @string_expandtabs(i32 %n, i8* %m) nounwind {
entry:
br i1 undef, label %bb33, label %bb1
@@ -22,11 +22,11 @@ bb19: ; preds = %bb30
bb20: ; preds = %bb19
%0 = load i32* undef, align 4 ; <i32> [#uses=1]
- %1 = sub i32 %0, undef ; <i32> [#uses=1]
+ %1 = sub i32 %0, %n ; <i32> [#uses=1]
br label %bb23
bb21: ; preds = %bb23
- %2 = icmp ult i8* %q.0, undef ; <i1> [#uses=1]
+ %2 = icmp ult i8* %q.0, %m ; <i1> [#uses=1]
br i1 %2, label %bb22, label %overflow2
bb22: ; preds = %bb21