1 ; RUN: llc < %s | FileCheck %s
2 ; CHECK: .long .Ltmp6-.Ltmp12 # Call between .Ltmp12 and .Ltmp6
4 ; We used to crash in filetype=obj when computing a negative value.
5 ; RUN: llc -filetype=obj < %s
7 target triple = "powerpc--netbsd"
8 @_ZTI1I = external constant { i8*, i8* }
9 define void @f(i8 %foo, i32 %bar) personality i8* bitcast (void ()* @g to i8*) {
11 to label %try.cont unwind label %lpad
13 %tmp = landingpad { i8*, i32 }
14 catch i8* bitcast ({ i8*, i8* }* @_ZTI1I to i8*)
15 br i1 undef, label %catch10, label %catch
16 catch10: ; preds = %lpad
17 %tmp8 = load i32, i32* undef, align 4
18 %conv.i.i = zext i8 %foo to i32
19 %cond.i.i = select i1 undef, i32 %conv.i.i, i32 %tmp8
20 invoke void @_Z24__put_character_sequenceIccEvR1AIT_T0_Ej(i32 %cond.i.i)
21 to label %invoke.cont20 unwind label %lpad15
22 invoke.cont20: ; preds = %catch10
24 try.cont: ; preds = %0
26 catch: ; preds = %lpad
27 %tmp14 = load i32, i32* undef, align 4
28 %conv.i.i34 = zext i8 %foo to i32
29 %cond.i.i35 = select i1 undef, i32 %conv.i.i34, i32 %tmp14
30 invoke void @_Z24__put_character_sequenceIccEvR1AIT_T0_Ej(i32 %cond.i.i35)
31 to label %invoke.cont8 unwind label %lpad3
32 invoke.cont8: ; preds = %call2.i.i.noexc36
34 lpad3: ; preds = %call2.i.i.noexc36, %catch
35 %tmp16 = landingpad { i8*, i32 }
38 to label %eh.resume unwind label %terminate.lpad
39 lpad15: ; preds = %catch10
40 %tmp19 = landingpad { i8*, i32 }
43 to label %eh.resume unwind label %terminate.lpad
44 eh.resume: ; preds = %lpad15, %lpad3
46 terminate.lpad: ; preds = %lpad15, %lpad3
47 %tmp22 = landingpad { i8*, i32 }
52 declare void @_Z24__put_character_sequenceIccEvR1AIT_T0_Ej(i32)