brintos

brintos / llvm-project-archived public Read only

0
0
Text · 687 B · 5c5de32 Raw
27 lines · plain
1; RUN: llc -mtriple=x86_64-unknown-linux-gnu -o - %s | FileCheck %s2 3; A lifetime end intrinsic should not prevent a call from being tail call4; optimized.5 6define void @foobar() {7; CHECK-LABEL: foobar8; CHECK: pushq	%rax9; CHECK: leaq	4(%rsp), %rdi10; CHECK: callq	foo11; CHECK: popq	%rax12; CHECK: jmp	bar13entry:14  %i = alloca i3215  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %i)16  call void @foo(ptr nonnull %i)17  tail call void @bar()18  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %i)19  ret void20}21 22declare void @foo(ptr nocapture %p)23declare void @bar()24 25declare void @llvm.lifetime.start.p0(i64, ptr nocapture)26declare void @llvm.lifetime.end.p0(i64, ptr nocapture)27