Mercurial > hg > CbC > CbC_llvm
comparison polly/test/ScopInfo/error-blocks-2.ll @ 252:1f2b6ac9f198 llvm-original
LLVM16-1
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 18 Aug 2023 09:04:13 +0900 |
parents | c4bab56944e8 |
children |
comparison
equal
deleted
inserted
replaced
237:c80f45b162ad | 252:1f2b6ac9f198 |
---|---|
29 ; CHECK-NEXT: [N, valid_val] -> { Stmt_S[i0] -> MemRef_A[i0] }; | 29 ; CHECK-NEXT: [N, valid_val] -> { Stmt_S[i0] -> MemRef_A[i0] }; |
30 ; CHECK-NEXT: } | 30 ; CHECK-NEXT: } |
31 ; | 31 ; |
32 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" | 32 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" |
33 | 33 |
34 define void @f(i32 %N, i32* noalias %valid, i32* noalias %ptr, i32* noalias %A) { | 34 define void @f(i32 %N, ptr noalias %valid, ptr noalias %ptr, ptr noalias %A) { |
35 entry: | 35 entry: |
36 %ptr.addr = alloca i32*, align 8 | 36 %ptr.addr = alloca ptr, align 8 |
37 store i32* %ptr, i32** %ptr.addr, align 8 | 37 store ptr %ptr, ptr %ptr.addr, align 8 |
38 %tmp = sext i32 %N to i64 | 38 %tmp = sext i32 %N to i64 |
39 br label %for.cond | 39 br label %for.cond |
40 | 40 |
41 for.cond: ; preds = %for.inc, %entry | 41 for.cond: ; preds = %for.inc, %entry |
42 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ] | 42 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ] |
43 %cmp = icmp slt i64 %indvars.iv, %tmp | 43 %cmp = icmp slt i64 %indvars.iv, %tmp |
44 br i1 %cmp, label %for.body, label %for.end | 44 br i1 %cmp, label %for.body, label %for.end |
45 | 45 |
46 for.body: ; preds = %for.cond | 46 for.body: ; preds = %for.cond |
47 %valid_val = load i32, i32* %valid, align 4 | 47 %valid_val = load i32, ptr %valid, align 4 |
48 %cmp1 = icmp eq i32 %valid_val, 0 | 48 %cmp1 = icmp eq i32 %valid_val, 0 |
49 br i1 %cmp1, label %if.then, label %if.end | 49 br i1 %cmp1, label %if.then, label %if.end |
50 | 50 |
51 if.then: ; preds = %for.body | 51 if.then: ; preds = %for.body |
52 call void @doSth(i32** nonnull %ptr.addr) | 52 call void @doSth(ptr nonnull %ptr.addr) |
53 br label %if.end | 53 br label %if.end |
54 | 54 |
55 if.end: ; preds = %if.then, %for.body | 55 if.end: ; preds = %if.then, %for.body |
56 br label %S | 56 br label %S |
57 | 57 |
58 S: ; preds = %if.end | 58 S: ; preds = %if.end |
59 %tmp2 = load i32*, i32** %ptr.addr, align 8 | 59 %tmp2 = load ptr, ptr %ptr.addr, align 8 |
60 %tmp3 = load i32, i32* %tmp2, align 4 | 60 %tmp3 = load i32, ptr %tmp2, align 4 |
61 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %indvars.iv | 61 %arrayidx = getelementptr inbounds i32, ptr %A, i64 %indvars.iv |
62 store i32 %tmp3, i32* %arrayidx, align 4 | 62 store i32 %tmp3, ptr %arrayidx, align 4 |
63 br label %for.inc | 63 br label %for.inc |
64 | 64 |
65 for.inc: ; preds = %S | 65 for.inc: ; preds = %S |
66 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 | 66 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 |
67 br label %for.cond | 67 br label %for.cond |
68 | 68 |
69 for.end: ; preds = %for.cond | 69 for.end: ; preds = %for.cond |
70 ret void | 70 ret void |
71 } | 71 } |
72 | 72 |
73 declare void @doSth(i32**) | 73 declare void @doSth(ptr) |