Remove irrelevant references to legacy git repositories from
[polly-mirror.git] / test / Simplify / overwritten_loadbetween.ll
blobc06263eb36ac0d54b0f79880d3ab16ef9331db3e
1 ; RUN: opt %loadPolly -polly-simplify -analyze < %s | FileCheck -match-full-lines %s 
3 ; Do not remove overwrites when the value is read before.
5 ; for (int j = 0; j < n; j += 1) {
6 ;body:
7 ;   A[0] = 21.0;
8 ;   val = A[0];
9 ;   A[0] = 42.0;
11 ;user:
12 ;   B[0] = val;
13 ; }
15 define void @overwritten(i32 %n, double* noalias nonnull %A, double* noalias nonnull %B) {
16 entry:
17   br label %for
19 for:
20   %j = phi i32 [0, %entry], [%j.inc, %inc]
21   %j.cmp = icmp slt i32 %j, %n
22   br i1 %j.cmp, label %body, label %exit
24     body:
25       store double 21.0, double* %A
26       %val = load double, double* %A
27       store double 42.0, double* %A
28       br label %user
30     user:
31       store double %val, double* %B
32       br label %inc
34 inc:
35   %j.inc = add nuw nsw i32 %j, 1
36   br label %for
38 exit:
39   br label %return
41 return:
42   ret void
46 ; CHECK: SCoP could not be simplified