File: cond-move-04.mir

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,998,520 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 (74 lines) | stat: -rw-r--r-- 1,941 bytes parent folder | download | duplicates (7)
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
67
68
69
70
71
72
73
74
# RUN: llc -mtriple=s390x-linux-gnu -mcpu=z13 -start-before=greedy %s -o - \
# RUN:   | FileCheck %s
#
# Test that regalloc manages (via regalloc hints) to avoid a LOCRMux jump
# sequence expansion.

--- |
  
  declare ptr @foo(ptr, i32 signext, i32 signext) local_unnamed_addr
  
  define ptr @fun(ptr returned) {
    br label %2
  
  ; <label>:2:                                      ; preds = %6, %1
    %3 = zext i16 undef to i32
    switch i32 %3, label %4 [
      i32 15, label %6
      i32 125, label %5
    ]
  
  ; <label>:4:                                      ; preds = %2
    br label %6
  
  ; <label>:5:                                      ; preds = %2
    br label %6
  
  ; <label>:6:                                      ; preds = %5, %4, %2
    %7 = phi i32 [ 4, %2 ], [ undef, %4 ], [ 10, %5 ]
    %8 = call ptr @foo(ptr undef, i32 signext undef, i32 signext %7)
    br label %2
  }

...

# CHECK: locr
# CHECK-NOT: risblg

---
name:            fun
alignment:       4
tracksRegLiveness: true
registers:       
  - { id: 0, class: gr32bit }
  - { id: 1, class: gr64bit }
  - { id: 2, class: grx32bit }
  - { id: 3, class: grx32bit }
  - { id: 4, class: grx32bit }
  - { id: 5, class: grx32bit }
  - { id: 6, class: grx32bit }
  - { id: 7, class: gr64bit }
  - { id: 8, class: gr64bit }
  - { id: 9, class: gr64bit }
  - { id: 10, class: gr64bit }
  - { id: 11, class: gr32bit }
frameInfo:       
  adjustsStack:    true
  hasCalls:        true
body:             |
  bb.0 (%ir-block.1):
    %3 = LHIMux 0
    %2 = LHIMux 4
    %5 = LHIMux 10
  
  bb.1 (%ir-block.2):
    CHIMux %3, 0, implicit-def $cc
    %0 = LOCRMux undef %0, %5, 14, 6, implicit $cc
    %0 = LOCRMux %0, %2, 14, 6, implicit killed $cc
    %7 = LGFR %0
    $r3d = LGHI 0
    $r4d = COPY %7
    CallBRASL @foo, undef $r2d, killed $r3d, killed $r4d, csr_systemz_elf, implicit-def dead $r14d, implicit-def dead $cc, implicit-def dead $r2d
    J %bb.1

...