1 ; RUN: opt %loadPolly -basic-aa -polly-codegen -S < %s | FileCheck %s
3 ; Verify that we remove the lifetime markers from everywhere.
5 ; CHECK-NOT: call void @llvm.lifetime.start
6 ; CHECK-NOT: call void @llvm.lifetime.end
10 ; for (int i = 0; i < 1024; i++) {
12 ; for (int j = i; j < 1024; j++)
18 ; ModuleID = 'test/Isl/CodeGen/lifetime_intrinsics.ll'
19 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
21 @A = common global [1024 x i32] zeroinitializer, align 16
23 ; Function Attrs: nounwind uwtable
24 define void @jd() #0 {
26 %tmp = alloca [1024 x i32], align 16
29 for.cond: ; preds = %for.inc11, %entry
30 %indvars.iv3 = phi i64 [ %indvars.iv.next4, %for.inc11 ], [ 0, %entry ]
31 %exitcond5 = icmp ne i64 %indvars.iv3, 1024
32 br i1 %exitcond5, label %for.body, label %for.end13
34 for.body: ; preds = %for.cond
35 call void @llvm.lifetime.start(i64 4096, ptr %tmp) #1
38 for.cond2: ; preds = %for.inc, %for.body
39 %indvars.iv1 = phi i64 [ %indvars.iv.next2, %for.inc ], [ %indvars.iv3, %for.body ]
40 %lftr.wideiv = trunc i64 %indvars.iv1 to i32
41 %exitcond = icmp ne i32 %lftr.wideiv, 1024
42 br i1 %exitcond, label %for.body4, label %for.end
44 for.body4: ; preds = %for.cond2
45 %arrayidx = getelementptr inbounds [1024 x i32], ptr @A, i64 0, i64 %indvars.iv1
46 %tmp6 = load i32, ptr %arrayidx, align 4
47 %arrayidx6 = getelementptr inbounds [1024 x i32], ptr %tmp, i64 0, i64 %indvars.iv3
48 %tmp7 = load i32, ptr %arrayidx6, align 4
49 %add = add nsw i32 %tmp7, %tmp6
50 store i32 %add, ptr %arrayidx6, align 4
53 for.inc: ; preds = %for.body4
54 %indvars.iv.next2 = add nuw nsw i64 %indvars.iv1, 1
57 for.end: ; preds = %for.cond2
58 %arrayidx8 = getelementptr inbounds [1024 x i32], ptr %tmp, i64 0, i64 %indvars.iv3
59 %tmp8 = load i32, ptr %arrayidx8, align 4
60 %arrayidx10 = getelementptr inbounds [1024 x i32], ptr @A, i64 0, i64 %indvars.iv3
61 store i32 %tmp8, ptr %arrayidx10, align 4
62 call void @llvm.lifetime.end(i64 4096, ptr %tmp) #1
65 for.inc11: ; preds = %for.end
66 %indvars.iv.next4 = add nuw nsw i64 %indvars.iv3, 1
69 for.end13: ; preds = %for.cond
73 ; Function Attrs: nounwind
74 declare void @llvm.lifetime.start(i64, ptr nocapture) #1
76 ; Function Attrs: nounwind
77 declare void @llvm.lifetime.end(i64, ptr nocapture) #1
79 attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" "use-soft-float"="false" }
80 attributes #1 = { nounwind }