github.com/llir/llvm@v0.3.6/asm/testdata/inst_other.ll (about) 1 define i32 @g() { 2 0: 3 ret i32 42 4 } 5 6 define void @h(i32 %x) { 7 0: 8 ret void 9 } 10 11 define void @f() { 12 0: 13 %1 = icmp eq i32 1, 2 14 br i1 %1, label %foo, label %baz 15 16 foo: 17 %2 = fcmp oeq double 3.0, 4.0 18 br i1 %2, label %bar, label %baz 19 20 bar: 21 br label %baz 22 23 baz: 24 %3 = phi i32 [ 10, %foo ], [ 20, %bar ], [ 30, %baz ] 25 %4 = select i1 true, i32 11, i32 22 26 %5 = call i32 @g() 27 call void @h(i32 30) 28 %6 = va_arg i8* null, i32 29 %7 = landingpad { i8*, i32 } 30 catch i8** null 31 ret void 32 33 handler0: 34 %8 = catchpad within %cs [i8** null] 35 ret void 36 37 handler1: 38 %9 = cleanuppad within %cs [i8** null] 39 ret void 40 41 dispatch: 42 %cs = catchswitch within none [label %handler0, label %handler1] unwind to caller 43 }