File: multiple-scops-in-a-row.ll

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-20
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,496,436 kB
  • sloc: cpp: 5,593,990; ansic: 986,873; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,547; xml: 953; cs: 573; fortran: 567
file content (51 lines) | stat: -rw-r--r-- 1,727 bytes parent folder | download | duplicates (20)
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
; RUN: opt %loadPolly -S -polly-codegen < %s | FileCheck %s

; This test case has two scops in a row. When code generating the first scop,
; the second scop is invalidated. This test case verifies that we do not crash
; due to incorrectly assuming the second scop is still valid.

; We explicitly check here that the second scop is not code generated. Later
; improvements may make this possible (e.g., Polly gaining support for
; parameteric conditional expressions or a changed code generation order).
; However, in case this happens, we want to ensure this test case is been
; reasoned about and updated accordingly.

; CHECK: polly.start:
; CHECK-NOT: polly.start:

target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"

define void @hoge(i8* %arg) {
bb:
  br label %bb1

bb1:                                              ; preds = %bb
  %tmp = getelementptr inbounds i8, i8* %arg, i64 5
  %tmp2 = getelementptr inbounds i8, i8* %arg, i64 6
  br i1 false, label %bb3, label %bb4

bb3:                                              ; preds = %bb1
  br label %bb4

bb4:                                              ; preds = %bb3, %bb1
  %tmp5 = icmp eq i32 0, 1
  br label %bb6

bb6:                                              ; preds = %bb4
  br i1 undef, label %bb7, label %bb8

bb7:                                              ; preds = %bb6
  unreachable

bb8:                                              ; preds = %bb6
  br i1 %tmp5, label %bb9, label %bb10

bb9:                                              ; preds = %bb8
  br label %bb11

bb10:                                             ; preds = %bb8
  br label %bb11

bb11:                                             ; preds = %bb10, %bb9
  ret void
}