File: attributor_recursion_crash.ll

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 1,998,492 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (56 lines) | stat: -rw-r--r-- 1,882 bytes parent folder | download | duplicates (12)
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, ptr }

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 ptr [ 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 ptr [ [[DOTPRE158_I]], [[BB3]] ], [ null, [[BB2]] ]
; CHECK-NEXT:    br i1 false, label [[BB6]], label [[BB5:%.*]]
; CHECK:       BB5:
; CHECK-NEXT:    [[GEP:%.*]] = getelementptr inbounds [[STRUCT_TS:%.*]], ptr [[PRE1]], i64 0, i32 1
; CHECK-NEXT:    [[Q3:%.*]] = load ptr, ptr [[GEP]], align 8
; CHECK-NEXT:    br label [[BB6]]
; CHECK:       BB6:
; CHECK-NEXT:    [[PRE2]] = phi ptr [ null, [[BB4]] ], [ [[Q3]], [[BB5]] ]
; CHECK-NEXT:    br label [[BB2]]
;
BB1:
  br label %BB2

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

BB3:
  br label %BB4

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

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

BB6:
  %pre2 = phi ptr [ 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}