1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S -hoist-common-insts=true | FileCheck %s
6 define void @test(i1 %P, i32* %Q) {
8 ; CHECK-NEXT: common.ret:
9 ; CHECK-NEXT: store i32 1, i32* [[Q:%.*]], align 4
10 ; CHECK-NEXT: [[A:%.*]] = load i32, i32* [[Q]], align 4
11 ; CHECK-NEXT: call void @bar(i32 [[A]])
12 ; CHECK-NEXT: ret void
14 br i1 %P, label %T, label %F
17 %A = load i32, i32* %Q ; <i32> [#uses=1]
18 call void @bar( i32 %A )
22 %B = load i32, i32* %Q ; <i32> [#uses=1]
23 call void @bar( i32 %B )