Clang] Fix expansion of response files in -Wp after integrated-cc1 change
[llvm-project.git] / polly / test / Simplify / coalesce_disjointelements.ll
blob2581be6f96eed01d04b9418ceb6d79fb106a6afd
1 ; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-simplify -analyze < %s | FileCheck -match-full-lines %s
3 ; Combine four partial stores into two.
4 ; The stores write to the same array, but never the same element.
6 ; for (int j = 0; j < n; j += 1) {
7 ;   A[0] = 21.0;
8 ;   A[1] = 42.0;
9 ;   A[0] = 21.0;
10 ;   A[1] = 42.0;
11 ; }
13 define void @coalesce_disjointelements(i32 %n, double* noalias nonnull %A) {
14 entry:
15   br label %for
17 for:
18   %j = phi i32 [0, %entry], [%j.inc, %inc]
19   %j.cmp = icmp slt i32 %j, %n
20   br i1 %j.cmp, label %body, label %exit
22     body:
23       %A_0 = getelementptr inbounds double, double* %A, i32 0
24       %A_1 = getelementptr inbounds double, double* %A, i32 1
25       store double 21.0, double* %A_0
26       store double 42.0, double* %A_1
27       store double 21.0, double* %A_0
28       store double 42.0, double* %A_1
29       br label %inc
31 inc:
32   %j.inc = add nuw nsw i32 %j, 1
33   br label %for
35 exit:
36   br label %return
38 return:
39   ret void
43 ; CHECK: Statistics {
44 ; CHECK:     Overwrites removed: 0
45 ; CHECK:     Partial writes coalesced: 2
46 ; CHECK: }
48 ; CHECK:      After accesses {
49 ; CHECK-NEXT:     Stmt_body
50 ; CHECK-NEXT:             MustWriteAccess :=  [Reduction Type: NONE] [Scalar: 0]
51 ; CHECK-NEXT:                 [n] -> { Stmt_body[i0] -> MemRef_A[0] };
52 ; CHECK-NEXT:            new: [n] -> { Stmt_body[i0] -> MemRef_A[0] : n <= 2147483647 };
53 ; CHECK-NEXT:             MustWriteAccess :=  [Reduction Type: NONE] [Scalar: 0]
54 ; CHECK-NEXT:                 [n] -> { Stmt_body[i0] -> MemRef_A[1] };
55 ; CHECK-NEXT:            new: [n] -> { Stmt_body[i0] -> MemRef_A[1] : n <= 2147483647 };
56 ; CHECK-NEXT: }