1 ; RUN: opt < %s -gvn -enable-pre -jump-threading -S | FileCheck %s
3 @H = common global i32 0
4 @G = common global i32 0
6 define i32 @test(i1 %cond, i32 %v) nounwind {
9 br i1 %cond, label %bb, label %bb1
13 ; CHECK-NOT: br label %return
14 %add.1 = add nuw nsw i32 %v, -1
15 store i32 %add.1, i32* @G, align 4
22 %add.2 = add i32 %v, -1
23 %cmp = icmp sgt i32 %add.2, 0
24 br i1 %cmp, label %action, label %return
28 ; CHECK-NEXT: br label %return
29 store i32 %add.2, i32* @H, align 4
33 %p = phi i32 [0, %merge], [1, %action]