llvm.org GIT mirror llvm / 3f101bb
RLE isn't smart enough to eliminate this safely yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60994 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 10 years ago
1 changed file(s) with 21 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: llvm-as < %s | opt -gvn | llvm-dis | grep load
1 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"
2 target triple = "i386-apple-darwin7"
3
4 define i32 @g(i32* %b, i32* %c) nounwind {
5 entry:
6 store i32 1, i32* %b
7 store i32 2, i32* %c
8
9 %t1 = icmp eq i32* %b, null ; [#uses=1]
10 br i1 %t1, label %bb, label %bb2
11
12 bb: ; preds = %entry
13 br label %bb2
14
15 bb2: ; preds = %bb1, %bb
16 %c_addr.0 = phi i32* [ %b, %entry ], [ %c, %bb ] ; [#uses=1]
17 %cv = load i32* %c_addr.0, align 4 ; [#uses=1]
18 ret i32 %cv
19 }
20