• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt %loadPolly -polly-delicm -analyze < %s | FileCheck %s
2;
3; Simple test for the existence of the DeLICM pass.
4;
5; // Simplest detected SCoP to run DeLICM on.
6; for (int j = 0; j < n; j += 1) {
7;   body: A[0] = 0.0;
8; }
9;
10define void @func(i32 %n, double* noalias nonnull %A) {
11entry:
12  br label %for
13
14for:
15  %j = phi i32 [0, %entry], [%j.inc, %inc]
16  %j.cmp = icmp slt i32 %j, %n
17  br i1 %j.cmp, label %body, label %exit
18
19    body:
20      store double 0.0, double* %A
21      br label %inc
22
23inc:
24  %j.inc = add nuw nsw i32 %j, 1
25  br label %for
26
27exit:
28  br label %return
29
30return:
31  ret void
32}
33
34
35; Verify that the DeLICM has a custom printScop() function.
36; CHECK: DeLICM result:
37