brintos

brintos / llvm-project-archived public Read only

0
0
Text · 590 B · 510fb2b Raw
25 lines · plain
1; RUN: opt -passes=mem2reg -S -o - < %s | FileCheck %s2 3declare void @llvm.lifetime.start.p0(ptr nocapture %ptr)4declare void @llvm.lifetime.end.p0(ptr nocapture %ptr)5 6define void @test1() {7; CHECK: test18; CHECK-NOT: alloca9  %A = alloca i3210  call void @llvm.lifetime.start.p0(ptr %A)11  store i32 1, ptr %A12  call void @llvm.lifetime.end.p0(ptr %A)13  ret void14}15 16define void @test2() {17; CHECK: test218; CHECK-NOT: alloca19  %A = alloca {i8, i16}20  call void @llvm.lifetime.start.p0(ptr %A)21  store {i8, i16} zeroinitializer, ptr %A22  call void @llvm.lifetime.end.p0(ptr %A)23  ret void24}25