llvm-project
37 строк · 762.0 Байт
1; RUN: opt %loadNPMPolly '-passes=polly-import-jscop,polly-codegen' -polly-import-jscop-postfix=transformed -S < %s | FileCheck %s
2;
3; Partial write, where "partial" is the empty set.
4; The store is never executed in this case and we do generate it in the
5; first place.
6;
7; for (int j = 0; j < n; j += 1)
8; A[0] = 42.0
9;
10
11define void @partial_write_emptyset(i32 %n, ptr noalias nonnull %A) {
12entry:
13br label %for
14
15for:
16%j = phi i32 [0, %entry], [%j.inc, %inc]
17%j.cmp = icmp slt i32 %j, %n
18br i1 %j.cmp, label %body, label %exit
19
20body:
21store double 42.0, ptr %A
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-LABEL: polly.stmt.body:
37; CHECK-NOT: store
38