[llvm-commits] [llvm] r112554 - in /llvm/trunk/test/Transforms/ValuePropagation: basic.ll phi.ll select.ll
Owen Anderson
resistor at mac.com
Mon Aug 30 16:37:42 PDT 2010
Author: resistor
Date: Mon Aug 30 18:37:41 2010
New Revision: 112554
URL: http://llvm.org/viewvc/llvm-project?rev=112554&view=rev
Log:
Combine these two tests, and make sure there's a newline at the end of the file.
Added:
llvm/trunk/test/Transforms/ValuePropagation/basic.ll
Removed:
llvm/trunk/test/Transforms/ValuePropagation/phi.ll
llvm/trunk/test/Transforms/ValuePropagation/select.ll
Added: llvm/trunk/test/Transforms/ValuePropagation/basic.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ValuePropagation/basic.ll?rev=112554&view=auto
==============================================================================
--- llvm/trunk/test/Transforms/ValuePropagation/basic.ll (added)
+++ llvm/trunk/test/Transforms/ValuePropagation/basic.ll Mon Aug 30 18:37:41 2010
@@ -0,0 +1,40 @@
+; RUN: opt < %s -value-propagation -S | FileCheck %s
+; PR2581
+
+; CHECK: @test1
+define i32 @test1(i1 %C) nounwind {
+ br i1 %C, label %exit, label %body
+
+body: ; preds = %0
+; CHECK-NOT: select
+ %A = select i1 %C, i32 10, i32 11 ; <i32> [#uses=1]
+; CHECK: ret i32 11
+ ret i32 %A
+
+exit: ; preds = %0
+; CHECK: ret i32 10
+ ret i32 10
+}
+
+declare i1 @ext()
+; CHECK: @test2
+define i1 @test2() {
+entry:
+ %cond = tail call i1 @ext() ; <i1> [#uses=2]
+ br i1 %cond, label %bb1, label %bb2
+
+bb1: ; preds = %entry
+ %cond2 = tail call i1 @ext() ; <i1> [#uses=1]
+ br i1 %cond2, label %bb3, label %bb2
+
+bb2: ; preds = %bb1, %entry
+; CHECK-NOT: phi i1
+ %cond_merge = phi i1 [ %cond, %entry ], [ false, %bb1 ] ; <i1> [#uses=1]
+; CHECK: ret i1 false
+ ret i1 %cond_merge
+
+bb3: ; preds = %bb1
+ %res = tail call i1 @ext() ; <i1> [#uses=1]
+; CHECK: ret i1 %res
+ ret i1 %res
+}
Removed: llvm/trunk/test/Transforms/ValuePropagation/phi.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ValuePropagation/phi.ll?rev=112553&view=auto
==============================================================================
--- llvm/trunk/test/Transforms/ValuePropagation/phi.ll (original)
+++ llvm/trunk/test/Transforms/ValuePropagation/phi.ll (removed)
@@ -1,17 +0,0 @@
-; RUN: opt < %s -value-propagation -S | FileCheck %s
-; PR2581
-
-; CHECK: @run
-define i32 @run(i1 %C) nounwind {
- br i1 %C, label %exit, label %body
-
-body: ; preds = %0
-; CHECK-NOT: select
- %A = select i1 %C, i32 10, i32 11 ; <i32> [#uses=1]
-; CHECK: ret i32 11
- ret i32 %A
-
-exit: ; preds = %0
-; CHECK: ret i32 10
- ret i32 10
-}
\ No newline at end of file
Removed: llvm/trunk/test/Transforms/ValuePropagation/select.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ValuePropagation/select.ll?rev=112553&view=auto
==============================================================================
--- llvm/trunk/test/Transforms/ValuePropagation/select.ll (original)
+++ llvm/trunk/test/Transforms/ValuePropagation/select.ll (removed)
@@ -1,25 +0,0 @@
-; RUN: opt < %s -value-propagation -S | FileCheck %s
-; PR4420
-
-declare i1 @ext()
-; CHECK: @foo
-define i1 @foo() {
-entry:
- %cond = tail call i1 @ext() ; <i1> [#uses=2]
- br i1 %cond, label %bb1, label %bb2
-
-bb1: ; preds = %entry
- %cond2 = tail call i1 @ext() ; <i1> [#uses=1]
- br i1 %cond2, label %bb3, label %bb2
-
-bb2: ; preds = %bb1, %entry
-; CHECK-NOT: phi i1
- %cond_merge = phi i1 [ %cond, %entry ], [ false, %bb1 ] ; <i1> [#uses=1]
-; CHECK: ret i1 false
- ret i1 %cond_merge
-
-bb3: ; preds = %bb1
- %res = tail call i1 @ext() ; <i1> [#uses=1]
-; CHECK: ret i1 %res
- ret i1 %res
-}
\ No newline at end of file
More information about the llvm-commits
mailing list