Clang] Fix expansion of response files in -Wp after integrated-cc1 change
[llvm-project.git] / polly / test / Simplify / overwritten_3store.ll
blob17353c65b6c4aee529a74dc2679775c1bcc03e81
1 ; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-simplify -analyze < %s | FileCheck -match-full-lines %s 
3 ; Remove a store that is overwritten by another store in the same statement.
4 ; Check that even multiple stores are removed.
6 ; for (int j = 0; j < n; j += 1) {
7 ;   A[0] = 10.5;
8 ;   A[0] = 21.0;
9 ;   A[0] = 42.0;
10 ; }
12 define void @overwritten_3store(i32 %n, double* noalias nonnull %A) {
13 entry:
14   br label %for
16 for:
17   %j = phi i32 [0, %entry], [%j.inc, %inc]
18   %j.cmp = icmp slt i32 %j, %n
19   br i1 %j.cmp, label %body, label %exit
21     body:
22       store double 10.5, double* %A
23       store double 21.0, double* %A
24       store double 42.0, double* %A
25       br label %inc
27 inc:
28   %j.inc = add nuw nsw i32 %j, 1
29   br label %for
31 exit:
32   br label %return
34 return:
35   ret void
39 ; CHECK: Statistics {
40 ; CHECK:     Overwrites removed: 2
41 ; CHECK: }
43 ; CHECK:      After accesses {
44 ; CHECK-NEXT:     Stmt_body
45 ; CHECK-NEXT:             MustWriteAccess :=  [Reduction Type: NONE] [Scalar: 0]
46 ; CHECK-NEXT:                 [n] -> { Stmt_body[i0] -> MemRef_A[0] };
47 ; CHECK-NEXT: }