• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: llc -mtriple=s390x-linux-gnu -mcpu=z15 -start-before=greedy %s -o - \
2# RUN:   | FileCheck %s
3#
4# Test that two-address reg alloc hints are given so that a SELR becomes LOCR.
5
6
7--- |
8  define i32 @fun(i32 %arg, i32 %arg1, i32 %arg2, i32* %arg3) { ret i32 0 }
9  declare void @foo(i32)
10...
11# CHECK-LABEL: fun
12# CHECK: locr
13
14---
15name:            fun
16alignment:       16
17tracksRegLiveness: true
18registers:
19  - { id: 0, class: gr32bit }
20  - { id: 1, class: gr32bit }
21  - { id: 2, class: gr32bit }
22  - { id: 3, class: gr32bit }
23  - { id: 4, class: gr64bit }
24  - { id: 5, class: grx32bit }
25  - { id: 6, class: grx32bit }
26  - { id: 7, class: addr64bit }
27  - { id: 8, class: grx32bit }
28  - { id: 9, class: grx32bit }
29  - { id: 10, class: gr64bit }
30  - { id: 11, class: gr32bit }
31frameInfo:
32  maxAlignment:    1
33  hasCalls:        true
34machineFunctionInfo: {}
35body:             |
36  bb.0:
37    %5:grx32bit = LHIMux 88
38    %8:grx32bit = LHIMux 77
39    %9:grx32bit = LHIMux 66
40
41  bb.1:
42    %6:grx32bit = LLCMux undef %7:addr64bit, 0, $noreg :: (load 1 from `i8* undef`)
43    CHIMux %6, 1, implicit-def $cc
44    %11:gr32bit = SELRMux %8, %9:grx32bit, 14, 6, implicit killed $cc
45    CHIMux %6, 2, implicit-def $cc
46    %0:gr32bit = SELRMux %11, %5, 14, 8, implicit killed $cc
47    ADJCALLSTACKDOWN 0, 0
48    %10:gr64bit = LGFR %0
49    $r2d = COPY %10
50    CallBRASL @foo, killed $r2d, csr_systemz, implicit-def dead $r14d, implicit-def dead $cc, implicit $fpc
51    ADJCALLSTACKUP 0, 0
52    J %bb.1
53
54...
55