1 ; To reduce register pressure, if a load is hoistable out of the loop, and the
2 ; result of the load is only used outside of the loop, sink the load instead of
5 ; RUN: llvm-as < %s | opt -licm | llvm-dis | %prcontext load 1 | grep Out:
7 @X = global i32 5 ; <i32*> [#uses=1]
9 define i32 @test(i32 %N) {
12 Loop: ; preds = %Loop, %Entry
13 %N_addr.0.pn = phi i32 [ %dec, %Loop ], [ %N, %Entry ] ; <i32> [#uses=2]
14 %tmp.6 = load i32* @X ; <i32> [#uses=1]
15 %dec = add i32 %N_addr.0.pn, -1 ; <i32> [#uses=1]
16 %tmp.1 = icmp ne i32 %N_addr.0.pn, 1 ; <i1> [#uses=1]
17 br i1 %tmp.1, label %Loop, label %Out