brintos

brintos / llvm-project-archived public Read only

0
0
Text · 784 B · 3428c8b Raw
29 lines · plain
1; RUN: llc -mtriple=hexagon < %s | FileCheck %s2; Check that the load/store to the volatile stack object has not been3; optimized away.4 5target triple = "hexagon"6 7; CHECK-LABEL: foo8; CHECK: memw(r29+#4) =9; CHECK: = memw(r29+#4)10define i32 @foo(i32 %a) #0 {11entry:12  %x = alloca i32, align 413  call void @llvm.lifetime.start.p0(i64 4, ptr %x)14  store volatile i32 0, ptr %x, align 415  %call = tail call i32 @bar() #016  %x.0.x.0. = load volatile i32, ptr %x, align 417  %add = add nsw i32 %x.0.x.0., %a18  call void @llvm.lifetime.end.p0(i64 4, ptr %x)19  ret i32 %add20}21 22declare void @llvm.lifetime.start.p0(i64, ptr nocapture) #123declare void @llvm.lifetime.end.p0(i64, ptr nocapture) #124 25declare i32 @bar(...) #026 27attributes #0 = { nounwind }28attributes #1 = { argmemonly nounwind }29