• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt %loadPolly -polly-scops -analyze -polly-print-instructions < %s | FileCheck %s
2;
3; Verify that we remove the ignored intrinsics from the instruction list.
4;
5; CHECK:       Instructions {
6; CHECK-NEXT:      store i32 %i.0, i32* %arrayidx, align 4
7; CHECK-NEXT:    }
8;
9;    int A[1024];
10;    void func() {
11;      for (int i = 0; i < 1024; i++)
12;          A[i] = i;
13;    }
14;
15target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
16
17define void @fun() #0 {
18entry:
19  %A = alloca [1024 x i32], align 16
20  br label %for.cond
21
22for.cond:                                         ; preds = %for.inc, %entry
23  %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.inc ]
24  %cmp = icmp slt i32 %i.0, 1024
25  br i1 %cmp, label %for.body, label %for.end
26
27for.body:                                         ; preds = %for.cond
28  %idxprom = sext i32 %i.0 to i64
29  %arrayidx = getelementptr inbounds [1024 x i32], [1024 x i32]* %A, i64 0, i64 %idxprom
30  call void @llvm.donothing()
31  store i32 %i.0, i32* %arrayidx, align 4
32  br label %for.inc
33
34for.inc:                                          ; preds = %for.body
35  %inc = add nsw i32 %i.0, 1
36  br label %for.cond
37
38for.end:                                          ; preds = %for.cond
39  ret void
40}
41
42; Function Attrs: nounwind readnone
43declare void @llvm.donothing() #1
44
45attributes #0 = { noinline nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
46attributes #1 = { nounwind readnone }
47