comparison polly/test/ForwardOpTree/forward_load_unrelatedunusual.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
11 ; 11 ;
12 ; bodyB: 12 ; bodyB:
13 ; A[j] = val; 13 ; A[j] = val;
14 ; } 14 ; }
15 ; 15 ;
16 define void @func(i32 %n, double* noalias nonnull %A, double* noalias nonnull %B, double *noalias %C) { 16 define void @func(i32 %n, ptr noalias nonnull %A, ptr noalias nonnull %B, ptr noalias %C) {
17 entry: 17 entry:
18 br label %for 18 br label %for
19 19
20 for: 20 for:
21 %j = phi i32 [0, %entry], [%j.inc, %inc] 21 %j = phi i32 [0, %entry], [%j.inc, %inc]
22 %j.cmp = icmp slt i32 %j, %n 22 %j.cmp = icmp slt i32 %j, %n
23 br i1 %j.cmp, label %bodyA, label %exit 23 br i1 %j.cmp, label %bodyA, label %exit
24 24
25 bodyA: 25 bodyA:
26 %B_idx = getelementptr inbounds double, double* %B, i32 %j 26 %B_idx = getelementptr inbounds double, ptr %B, i32 %j
27 %val = load double, double* %B_idx 27 %val = load double, ptr %B_idx
28 store double 21.0, double* %C 28 store double 21.0, ptr %C
29 store double 41.0, double* %C 29 store double 41.0, ptr %C
30 br label %bodyB 30 br label %bodyB
31 31
32 bodyB: 32 bodyB:
33 %A_idx = getelementptr inbounds double, double* %A, i32 %j 33 %A_idx = getelementptr inbounds double, ptr %A, i32 %j
34 store double %val, double* %A_idx 34 store double %val, ptr %A_idx
35 br label %inc 35 br label %inc
36 36
37 inc: 37 inc:
38 %j.inc = add nuw nsw i32 %j, 1 38 %j.inc = add nuw nsw i32 %j, 1
39 br label %for 39 br label %for
57 ; CHECK-NEXT: ; 57 ; CHECK-NEXT: ;
58 ; CHECK-NEXT: new: [n] -> { Stmt_bodyB[i0] -> MemRef_B[i0] }; 58 ; CHECK-NEXT: new: [n] -> { Stmt_bodyB[i0] -> MemRef_B[i0] };
59 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0] 59 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
60 ; CHECK-NEXT: [n] -> { Stmt_bodyB[i0] -> MemRef_A[i0] }; 60 ; CHECK-NEXT: [n] -> { Stmt_bodyB[i0] -> MemRef_A[i0] };
61 ; CHECK-NEXT: Instructions { 61 ; CHECK-NEXT: Instructions {
62 ; CHECK-NEXT: %val = load double, double* %B_idx, align 8 62 ; CHECK-NEXT: %val = load double, ptr %B_idx, align 8
63 ; CHECK-NEXT: store double %val, double* %A_idx, align 8 63 ; CHECK-NEXT: store double %val, ptr %A_idx, align 8
64 ; CHECK-NEXT: } 64 ; CHECK-NEXT: }