diff options
author | Chris Lattner <sabre@nondot.org> | 2009-11-26 23:32:59 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-11-26 23:32:59 +0000 |
commit | 38028653a95ba7dd666ce01918add96d5d13f412 (patch) | |
tree | f72b2ec572af1e7180f9548a7fe656129c76a74a /test/Transforms/GVN/rle-phi-translate.ll | |
parent | dbee4b3be58303c92c12ed2e61e6e250bab02e95 (diff) | |
download | external_llvm-38028653a95ba7dd666ce01918add96d5d13f412.zip external_llvm-38028653a95ba7dd666ce01918add96d5d13f412.tar.gz external_llvm-38028653a95ba7dd666ce01918add96d5d13f412.tar.bz2 |
convert to filecheck
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89977 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/GVN/rle-phi-translate.ll')
-rw-r--r-- | test/Transforms/GVN/rle-phi-translate.ll | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/test/Transforms/GVN/rle-phi-translate.ll b/test/Transforms/GVN/rle-phi-translate.ll index 1f1baa9..06b0af7 100644 --- a/test/Transforms/GVN/rle-phi-translate.ll +++ b/test/Transforms/GVN/rle-phi-translate.ll @@ -1,32 +1,36 @@ -; RUN: opt < %s -gvn -S | grep {%cv = phi i32} -; RUN: opt < %s -gvn -S | grep {%bv = phi i32} +; RUN: opt < %s -gvn -S | FileCheck %s + 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:128:128" target triple = "i386-apple-darwin7" -define i32 @g(i32* %b, i32* %c) nounwind { +define i32 @test1(i32* %b, i32* %c) nounwind { entry: - %g = alloca i32 ; <i32*> [#uses=4] - %t1 = icmp eq i32* %b, null ; <i1> [#uses=1] + %g = alloca i32 + %t1 = icmp eq i32* %b, null br i1 %t1, label %bb, label %bb1 -bb: ; preds = %entry - %t2 = load i32* %c, align 4 ; <i32> [#uses=1] - %t3 = add i32 %t2, 1 ; <i32> [#uses=1] +bb: + %t2 = load i32* %c, align 4 + %t3 = add i32 %t2, 1 store i32 %t3, i32* %g, align 4 br label %bb2 bb1: ; preds = %entry - %t5 = load i32* %b, align 4 ; <i32> [#uses=1] - %t6 = add i32 %t5, 1 ; <i32> [#uses=1] + %t5 = load i32* %b, align 4 + %t6 = add i32 %t5, 1 store i32 %t6, i32* %g, align 4 br label %bb2 bb2: ; preds = %bb1, %bb - %c_addr.0 = phi i32* [ %g, %bb1 ], [ %c, %bb ] ; <i32*> [#uses=1] - %b_addr.0 = phi i32* [ %b, %bb1 ], [ %g, %bb ] ; <i32*> [#uses=1] - %cv = load i32* %c_addr.0, align 4 ; <i32> [#uses=1] - %bv = load i32* %b_addr.0, align 4 ; <i32> [#uses=1] - %ret = add i32 %cv, %bv ; <i32> [#uses=1] + %c_addr.0 = phi i32* [ %g, %bb1 ], [ %c, %bb ] + %b_addr.0 = phi i32* [ %b, %bb1 ], [ %g, %bb ] + %cv = load i32* %c_addr.0, align 4 + %bv = load i32* %b_addr.0, align 4 +; CHECK: %bv = phi i32 +; CHECK: %cv = phi i32 +; CHECK-NOT: load +; CHECK: ret i32 + %ret = add i32 %cv, %bv ret i32 %ret } |