1 ; RUN: opt -inline -S -o - < %s | FileCheck %s
2 ; RUN: opt -passes='cgscc(inline)' -S < %s | FileCheck %s
5 %struct.Foo = type { i32, %0* }
7 ; Test that we don't crash when inlining @bar (rdar://22521387).
8 define void @foo(%struct.Foo* align 4 %a) {
10 call fastcc void @bar(%struct.Foo* nonnull align 4 undef)
12 ; CHECK: call void @llvm.assume(i1 undef)
18 define fastcc void @bar(%struct.Foo* align 4 %a) {
21 %b = getelementptr inbounds %struct.Foo, %struct.Foo* %a, i32 0, i32 1
22 br i1 undef, label %if.end, label %if.then.i.i
25 call void @llvm.assume(i1 undef)
32 declare void @llvm.assume(i1)