llvm-project
36 строк · 780.0 Байт
1; RUN: opt %loadNPMPolly "-passes=scop(print<polly-simplify>)" -disable-output -aa-pipeline=basic-aa < %s | FileCheck %s -match-full-lines
2;
3; A store that has a different index than the load it is storing is
4; not redundant.
5;
6; for (int j = 0; j < n; j += 1)
7; A[0] = A[0];
8;
9define void @func(i32 %n, ptr noalias nonnull %A) {
10entry:
11br label %for
12
13for:
14%j = phi i32 [0, %entry], [%j.inc, %inc]
15%j.cmp = icmp slt i32 %j, %n
16br i1 %j.cmp, label %body, label %exit
17
18body:
19%val = load double, ptr %A
20%A_idx = getelementptr inbounds double, ptr %A, i32 %j
21store double %val, ptr %A_idx
22br label %inc
23
24inc:
25%j.inc = add nuw nsw i32 %j, 1
26br label %for
27
28exit:
29br label %return
30
31return:
32ret void
33}
34
35
36; CHECK: SCoP could not be simplified
37