[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / polly / test / Simplify / overwritten_3store.ll
blob63eb5b54f93187d7e624eec245eda00731a79691
1 ; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-print-simplify -disable-output < %s | FileCheck -match-full-lines %s
2 ; RUN: opt %loadNPMPolly -polly-stmt-granularity=bb "-passes=scop(print<polly-simplify>)" -disable-output -aa-pipeline=basic-aa < %s | FileCheck -match-full-lines %s
4 ; Remove a store that is overwritten by another store in the same statement.
5 ; Check that even multiple stores are removed.
7 ; for (int j = 0; j < n; j += 1) {
8 ;   A[0] = 10.5;
9 ;   A[0] = 21.0;
10 ;   A[0] = 42.0;
11 ; }
13 define void @overwritten_3store(i32 %n, ptr 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       store double 10.5, ptr %A
24       store double 21.0, ptr %A
25       store double 42.0, ptr %A
26       br label %inc
28 inc:
29   %j.inc = add nuw nsw i32 %j, 1
30   br label %for
32 exit:
33   br label %return
35 return:
36   ret void
40 ; CHECK: Statistics {
41 ; CHECK:     Overwrites removed: 2
42 ; CHECK: }
44 ; CHECK:      After accesses {
45 ; CHECK-NEXT:     Stmt_body
46 ; CHECK-NEXT:             MustWriteAccess :=  [Reduction Type: NONE] [Scalar: 0]
47 ; CHECK-NEXT:                 [n] -> { Stmt_body[i0] -> MemRef_A[0] };
48 ; CHECK-NEXT: }