File: attributor_recursion_crash.ll

package info (click to toggle)
llvm-toolchain-15 1%3A15.0.6-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,554,644 kB
  • sloc: cpp: 5,922,452; ansic: 1,012,136; asm: 674,362; python: 191,568; objc: 73,855; f90: 42,327; lisp: 31,913; pascal: 11,973; javascript: 10,144; sh: 9,421; perl: 7,447; ml: 5,527; awk: 3,523; makefile: 2,520; xml: 885; cs: 573; fortran: 567
file content (56 lines) | stat: -rw-r--r-- 2,002 bytes parent folder | download
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
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes
; RUN: opt -passes=openmp-opt -S < %s | FileCheck %s
; TODO: This should have a second test case with a chain load->phi->load->phi
;                                                           A              |
;                                                           \-------------/

%"struct.TS" = type { i32, %"struct.TS"* }

define weak amdgpu_kernel void @k() {
; CHECK-LABEL: define {{[^@]+}}@k() {
; CHECK-NEXT:  BB1:
; CHECK-NEXT:    br label [[BB2:%.*]]
; CHECK:       BB2:
; CHECK-NEXT:    [[DOTPRE158_I:%.*]] = phi %struct.TS* [ null, [[BB1:%.*]] ], [ [[PRE2:%.*]], [[BB6:%.*]] ]
; CHECK-NEXT:    br i1 false, label [[BB4:%.*]], label [[BB3:%.*]]
; CHECK:       BB3:
; CHECK-NEXT:    br label [[BB4]]
; CHECK:       BB4:
; CHECK-NEXT:    [[PRE1:%.*]] = phi %struct.TS* [ [[DOTPRE158_I]], [[BB3]] ], [ null, [[BB2]] ]
; CHECK-NEXT:    br i1 false, label [[BB6]], label [[BB5:%.*]]
; CHECK:       BB5:
; CHECK-NEXT:    [[GEP:%.*]] = getelementptr inbounds [[STRUCT_TS:%.*]], %struct.TS* [[PRE1]], i64 0, i32 1
; CHECK-NEXT:    [[Q3:%.*]] = load %struct.TS*, %struct.TS** [[GEP]], align 8
; CHECK-NEXT:    br label [[BB6]]
; CHECK:       BB6:
; CHECK-NEXT:    [[PRE2]] = phi %struct.TS* [ null, [[BB4]] ], [ [[Q3]], [[BB5]] ]
; CHECK-NEXT:    br label [[BB2]]
;
BB1:
  br label %BB2

BB2:
  %.pre158.i = phi %"struct.TS"* [ null, %BB1 ], [ %pre2, %BB6 ]
  br i1 false, label %BB4, label %BB3

BB3:
  br label %BB4

BB4:
  %pre1 = phi %"struct.TS"* [ %.pre158.i, %BB3 ], [ null, %BB2 ]
  br i1 false, label %BB6, label %BB5

BB5:
  %gep = getelementptr inbounds %"struct.TS", %"struct.TS"* %pre1, i64 0, i32 1
  %q3 = load %"struct.TS"*, %"struct.TS"** %gep, align 8
  br label %BB6

BB6:
  %pre2 = phi %"struct.TS"* [ null, %BB4 ], [ %q3, %BB5 ]
  br label %BB2
}

!llvm.module.flags = !{!0, !1}

!0 = !{i32 7, !"openmp", i32 50}
!1 = !{i32 7, !"openmp-device", i32 50}