llvm-project
50 строк · 1.1 Кб
1; RUN: opt %loadNPMPolly "-passes=scop(print<polly-simplify>)" -disable-output -aa-pipeline=basic-aa < %s | FileCheck %s -match-full-lines
2;
3; Do not remove dependencies of a phi node within a region statement (%phi).
4;
5define void @func(i32 %n, ptr noalias nonnull %A, double %alpha) {
6entry:
7br label %for
8
9for:
10%j = phi i32 [0, %entry], [%j.inc, %inc]
11%j.cmp = icmp slt i32 %j, %n
12br i1 %j.cmp, label %body, label %exit
13
14body:
15%val = fadd double 21.0, 21.0
16br label %region_entry
17
18
19region_entry:
20%region.cmp = fcmp ueq double %alpha, 0.0
21br i1 %region.cmp, label %region_true, label %region_exit
22
23region_true:
24br i1 true, label %region_verytrue, label %region_mostlytrue
25
26region_verytrue:
27br label %region_mostlytrue
28
29region_mostlytrue:
30%phi = phi double [%val, %region_true], [0.0, %region_verytrue]
31store double %phi, ptr %A
32br label %region_exit
33
34region_exit:
35br label %inc
36
37
38inc:
39%j.inc = add nuw nsw i32 %j, 1
40br label %for
41
42exit:
43br label %return
44
45return:
46ret void
47}
48
49
50; CHECK: SCoP could not be simplified
51