1 ; RUN: opt -S -instcombine < %s | FileCheck %s
3 declare void @readnone_but_may_throw() readnone
5 define void @f_0(i32* %ptr) {
8 ; CHECK: store i32 10, i32* %ptr
9 ; CHECK-NEXT: call void @readnone_but_may_throw()
10 ; CHECK-NEXT: store i32 20, i32* %ptr, align 4
13 store i32 10, i32* %ptr
14 call void @readnone_but_may_throw()
15 store i32 20, i32* %ptr
19 define void @f_1(i1 %cond, i32* %ptr) {
21 ; CHECK: store i32 10, i32* %ptr
22 ; CHECK-NEXT: call void @readnone_but_may_throw()
24 store i32 10, i32* %ptr
25 call void @readnone_but_may_throw()
26 br i1 %cond, label %left, label %merge
29 store i32 20, i32* %ptr