File: parallelorifcollapse.ll

package info (click to toggle)
llvm-toolchain-17 1%3A17.0.6-22
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,799,624 kB
  • sloc: cpp: 6,428,607; ansic: 1,383,196; asm: 793,408; python: 223,504; objc: 75,364; f90: 60,502; lisp: 33,869; pascal: 15,282; sh: 9,684; perl: 7,453; ml: 4,937; awk: 3,523; makefile: 2,889; javascript: 2,149; xml: 888; fortran: 619; cs: 573
file content (66 lines) | stat: -rw-r--r-- 2,412 bytes parent folder | download | duplicates (4)
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
65
66
; Function Attrs: nounwind
; RUN: llc < %s -march=r600 -mcpu=redwood  | FileCheck %s
;
; CFG flattening should use parallel-or to generate branch conditions and
; then merge if-regions with the same bodies.

; FIXME: For some reason having the allocas here allowed the flatten cfg pass
; to do its transformation, however now that we are using local memory for
; allocas, the transformation isn't happening.
; XFAIL: *
;
; CHECK: OR_INT
; CHECK-NEXT: OR_INT
; CHECK-NEXT: OR_INT
define amdgpu_kernel void @_Z9chk1D_512v() #0 {
entry:
  %a0 = alloca i32, align 4, addrspace(5)
  %b0 = alloca i32, align 4, addrspace(5)
  %c0 = alloca i32, align 4, addrspace(5)
  %d0 = alloca i32, align 4, addrspace(5)
  %a1 = alloca i32, align 4, addrspace(5)
  %b1 = alloca i32, align 4, addrspace(5)
  %c1 = alloca i32, align 4, addrspace(5)
  %d1 = alloca i32, align 4, addrspace(5)
  %data = alloca i32, align 4, addrspace(5)
  %0 = load i32, ptr addrspace(5) %a0, align 4
  %1 = load i32, ptr addrspace(5) %b0, align 4
  %cmp = icmp ne i32 %0, %1
  br i1 %cmp, label %land.lhs.true, label %if.else

land.lhs.true:                                    ; preds = %entry
  %2 = load i32, ptr addrspace(5) %c0, align 4
  %3 = load i32, ptr addrspace(5) %d0, align 4
  %cmp1 = icmp ne i32 %2, %3
  br i1 %cmp1, label %if.then, label %if.else

if.then:                                          ; preds = %land.lhs.true
  br label %if.end

if.else:                                          ; preds = %land.lhs.true, %entry
  store i32 1, ptr addrspace(5) %data, align 4
  br label %if.end

if.end:                                           ; preds = %if.else, %if.then
  %4 = load i32, ptr addrspace(5) %a1, align 4
  %5 = load i32, ptr addrspace(5) %b1, align 4
  %cmp2 = icmp ne i32 %4, %5
  br i1 %cmp2, label %land.lhs.true3, label %if.else6

land.lhs.true3:                                   ; preds = %if.end
  %6 = load i32, ptr addrspace(5) %c1, align 4
  %7 = load i32, ptr addrspace(5) %d1, align 4
  %cmp4 = icmp ne i32 %6, %7
  br i1 %cmp4, label %if.then5, label %if.else6

if.then5:                                         ; preds = %land.lhs.true3
  br label %if.end7

if.else6:                                         ; preds = %land.lhs.true3, %if.end
  store i32 1, ptr addrspace(5) %data, align 4
  br label %if.end7

if.end7:                                          ; preds = %if.else6, %if.then5
  ret void
}