[arc] Remove unittesting from arcconfig
[polly-mirror.git] / test / DeLICM / skip_multiaccess.ll
blob92c0b123de4c3f2ccbb4989dc3fb14338ccfc419
1 ; RUN: opt %loadPolly -polly-delicm -pass-remarks-missed=polly-delicm -disable-output < %s 2>&1 | FileCheck %s
3 ; llvm.org/PR34485
4 ; llvm.org/PR34989
6 ; The memset causes the array A to be divided into i8-sized subelements.
7 ; The the regular store then writes multiple of these subelements, which
8 ; we do not support currently.
10 ;    void func(double *A) {
11 ;      memset(A, 0, 4);
12 ;      for (int j = 0; j < 2; j += 1) { /* outer */
13 ;        double phi = 0.0;
14 ;        for (int i = 0; i < 4; i += 1) /* reduction */
15 ;          phi += 4.2;
16 ;        A[j] = phi;
17 ;      }
18 ;    }
20 declare void @llvm.memset.p0f64.i64(double* nocapture, i8, i64, i32, i1)
22 define void @func(double* noalias nonnull %A) {
23 entry:
24   br label %outer.for
26 outer.for:
27   %j = phi i32 [0, %entry], [%j.inc, %outer.inc]
28   call void @llvm.memset.p0f64.i64(double* %A, i8 0, i64 4, i32 1, i1 false)
29   %j.cmp = icmp slt i32 %j, 2
30   br i1 %j.cmp, label %reduction.for, label %outer.exit
33     reduction.for:
34       %i = phi i32 [0, %outer.for], [%i.inc, %reduction.inc]
35       %phi = phi double [0.0, %outer.for], [%add, %reduction.inc]
36       %i.cmp = icmp slt i32 %i, 4
37       br i1 %i.cmp, label %body, label %reduction.exit
41         body:
42           %add = fadd double %phi, 4.2
43           br label %reduction.inc
47     reduction.inc:
48       %i.inc = add nuw nsw i32 %i, 1
49       br label %reduction.for
51     reduction.exit:
52       %A_idx = getelementptr inbounds double, double* %A, i32 %j
53       store double %phi, double* %A_idx
54       br label %outer.inc
58 outer.inc:
59   %j.inc = add nuw nsw i32 %j, 1
60   br label %outer.for
62 outer.exit:
63   br label %return
65 return:
66   ret void
70 ; CHECK: skipped possible mapping target because it writes more than one element