1 # RUN: llc -march=hexagon -run-pass hexagon-early-if %s -o - | FileCheck %s
3 # Test that the LIFETIME_END instruction is not speculated and moved to a
4 # different basic block.
17 %s.5 = type { i32, i32, i8* }
19 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #0
21 define hidden fastcc void @f0() {
23 %v0 = alloca %s.0, align 4
24 %v1 = load i8, i8* undef, align 1
25 %v2 = add i8 %v1, -102
26 %v3 = icmp ult i8 %v2, 1
27 br i1 %v3, label %b1, label %b2
30 %v4 = bitcast %s.0* %v0 to i8*
31 call void @llvm.lifetime.end.p0i8(i64 12, i8* nonnull %v4)
34 b2: ; preds = %b1, %b0
38 attributes #0 = { argmemonly nounwind }
45 - { id: 0, class: intregs, preferred-register: '' }
46 - { id: 1, class: intregs, preferred-register: '' }
47 - { id: 2, class: predregs, preferred-register: '' }
48 - { id: 3, class: predregs, preferred-register: '' }
54 - { id: 0, name: v0, type: default, offset: 0, size: 12, alignment: 4 }
58 successors: %bb.1.b1(0x40000000), %bb.2.b2(0x40000000)
61 %0 = L2_loadrb_io killed %1, 0 :: (load 1 from `i8* undef`)
62 %2 = C2_cmpeqi killed %0, 102
64 J2_jumpf killed %3, %bb.2.b2, implicit-def dead $pc
65 J2_jump %bb.1.b1, implicit-def dead $pc
68 successors: %bb.2.b2(0x80000000)
70 LIFETIME_END %stack.0.v0
73 PS_jmpret $r31, implicit-def dead $pc