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, ptr }
19 declare void @llvm.lifetime.end.p0(i64, ptr nocapture) #0
21 define hidden fastcc void @f0() {
23 %v0 = alloca %s.0, align 4
24 %v1 = load i8, ptr 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 call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %v0)
33 b2: ; preds = %b1, %b0
37 attributes #0 = { argmemonly nounwind }
44 - { id: 0, class: intregs, preferred-register: '' }
45 - { id: 1, class: intregs, preferred-register: '' }
46 - { id: 2, class: predregs, preferred-register: '' }
47 - { id: 3, class: predregs, preferred-register: '' }
53 - { id: 0, name: v0, type: default, offset: 0, size: 12, alignment: 4 }
57 successors: %bb.1.b1(0x40000000), %bb.2.b2(0x40000000)
60 %0 = L2_loadrb_io killed %1, 0 :: (load (s8) from `ptr undef`)
61 %2 = C2_cmpeqi killed %0, 102
63 J2_jumpf killed %3, %bb.2.b2, implicit-def dead $pc
64 J2_jump %bb.1.b1, implicit-def dead $pc
67 successors: %bb.2.b2(0x80000000)
69 LIFETIME_END %stack.0.v0
72 PS_jmpret $r31, implicit-def dead $pc