Clang] Fix expansion of response files in -Wp after integrated-cc1 change
[llvm-project.git] / polly / test / Simplify / redundant_scalarwrite.ll
blobc0071941575cba8a0d83cd376c2485ccb0db209f
1 ; RUN: opt %loadPolly -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-simplify -analyze < %s | FileCheck %s -match-full-lines
3 ; Remove redundant scalar stores.
5 ; for (int j = 0; j < n; j += 1) {
6 ; bodyA:
7 ;   double val = A[0];
9 ; bodyB:
10 ;   A[0] = val;
11 ; }
13 define void @redundant_scalarwrite(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 %bodyA, label %exit
23     bodyA:
24       %val = load double, double* %A
25       br label %bodyB
27     bodyB:
28       store double %val, double* %A
29       br label %inc
32 inc:
33   %j.inc = add nuw nsw i32 %j, 1
34   br label %for
36 exit:
37   br label %return
39 return:
40   ret void
44 ; CHECK: Statistics {
45 ; CHECK:     Redundant writes removed: 2
46 ; CHECK: }
48 ; CHECK:      After accesses {
49 ; CHECK-NEXT: }