From 503dcc982227893c532f03cbd6449e01a1739df3 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Mon, 15 Nov 2010 16:43:28 +0000 Subject: Move PHI tests to phi.ll, out of select.ll. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119153 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Transforms/InstCombine/select.ll | 51 ++--------------------------------- 1 file changed, 2 insertions(+), 49 deletions(-) (limited to 'test/Transforms/InstCombine/select.ll') diff --git a/test/Transforms/InstCombine/select.ll b/test/Transforms/InstCombine/select.ll index c1c1f08383..120d158aa6 100644 --- a/test/Transforms/InstCombine/select.ll +++ b/test/Transforms/InstCombine/select.ll @@ -500,59 +500,12 @@ define i1 @test40(i1 %cond) { ; CHECK: ret i1 false } -define i1 @test41(i1 %cond) { - %zero = alloca i32 - %one = alloca i32 - br i1 %cond, label %true, label %false -true: - br label %ret -false: - br label %ret -ret: - %ptr = phi i32* [ %zero, %true ] , [ %one, %false ] - %isnull = icmp eq i32* %ptr, null - ret i1 %isnull -; CHECK: @test41 -; CHECK: ret i1 false -} - -define i1 @test42(i1 %cond, double %x) { - br i1 %cond, label %true, label %false -true: - br label %ret -false: - br label %ret -ret: - %p = phi double [ %x, %true ], [ 0x7FF0000000000000, %false ]; RHS = +infty - %cmp = fcmp ule double %x, %p - ret i1 %cmp -; CHECK: @test42 -; CHECK: ret i1 true -} - -define i1 @test43(i1 %cond) { - %a = alloca i32 - %b = alloca i32 - %c = alloca i32 - br i1 %cond, label %true, label %false -true: - br label %ret -false: - br label %ret -ret: - %p = phi i32* [ %a, %true ], [ %b, %false ] - %r = icmp eq i32* %p, %c - ret i1 %r -; CHECK: @test43 -; CHECK: ret i1 false -} - -define i32 @test44(i1 %cond, i32 %x, i32 %y) { +define i32 @test41(i1 %cond, i32 %x, i32 %y) { %z = and i32 %x, %y %s = select i1 %cond, i32 %y, i32 %z %r = and i32 %x, %s ret i32 %r -; CHECK: @test44 +; CHECK: @test41 ; CHECK: %r = and i32 %x, %y ; CHECK: ret i32 %r } -- cgit v1.2.3