File: ImportContext-Unvalid-Context.ll

package info (click to toggle)
llvm-toolchain-13 1%3A13.0.1-11
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,418,840 kB
  • sloc: cpp: 5,290,826; ansic: 996,570; asm: 544,593; python: 188,212; objc: 72,027; lisp: 30,291; f90: 25,395; sh: 24,898; javascript: 9,780; pascal: 9,398; perl: 7,484; ml: 5,432; awk: 3,523; makefile: 2,913; xml: 953; cs: 573; fortran: 539
file content (64 lines) | stat: -rw-r--r-- 2,021 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
; RUN: not --crash opt %loadPolly -polly-import-jscop -polly-ast -polly-ast-detect-parallel < %s 2>&1 >/dev/null | FileCheck %s
;
; CHECK: unexpected isl_token
;
; Verify if the JSONImporter check if the context is parsed successfully.
;
;    void ic2(int *A, long n) {
;      for (long i = 0; i < 2 * n; i++)
; S0:    A[0] += i;
;      for (long i = 0; i < 2 * n; i++)
; S1:    A[i + 1] = 1;
;    }
;
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"

define void @ic2(i32* %A, i32 %n) {
entry:
  br label %for.cond

for.cond:                                         ; preds = %for.inc, %entry
  %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.inc ]
  %mul = shl nsw i32 %n, 1
  %cmp = icmp slt i32 %i.0, %mul
  br i1 %cmp, label %for.body, label %for.end

for.body:                                         ; preds = %for.cond
  br label %S0

S0:                                               ; preds = %for.body
  %tmp = load i32, i32* %A, align 4
  %add = add nsw i32 %tmp, %i.0
  store i32 %add, i32* %A, align 4
  br label %for.inc

for.inc:                                          ; preds = %S0
  %inc = add nsw i32 %i.0, 1
  br label %for.cond

for.end:                                          ; preds = %for.cond
  br label %for.cond2

for.cond2:                                        ; preds = %for.inc8, %for.end
  %i1.0 = phi i32 [ 0, %for.end ], [ %inc9, %for.inc8 ]
  %mul3 = shl nsw i32 %n, 1
  %cmp4 = icmp slt i32 %i1.0, %mul3
  br i1 %cmp4, label %for.body5, label %for.end10

for.body5:                                        ; preds = %for.cond2
  br label %S1

S1:                                               ; preds = %for.body5
  %add6 = add nsw i32 %i1.0, 1
  %arrayidx7 = getelementptr inbounds i32, i32* %A, i32 %add6
  store i32 1, i32* %arrayidx7, align 4
  br label %for.inc8

for.inc8:                                         ; preds = %S1
  %inc9 = add nsw i32 %i1.0, 1
  br label %for.cond2

for.end10:                                        ; preds = %for.cond2
  ret void
}