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