summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Mips/GlobalISel/legalizer/implicit_def.mir
blob: 4f437803d46bb909012b2eee42be4a433d474e8c (plain)
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -O0 -mtriple=mipsel-linux-gnu -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=MIPS32
--- |

  declare void @f_i32(i32)
  define void @g_i32() {entry: ret void}

  declare void @f_i64(i64)
  define void @g_i64() {entry: ret void}

  declare void @f_float(float)
  define void @g_float() {entry: ret void}

  declare void @f_double(double)
  define void @g_double() {entry: ret void}

...
---
name:            g_i32
alignment:       2
tracksRegLiveness: true
body:             |
  bb.1.entry:
    ; MIPS32-LABEL: name: g_i32
    ; MIPS32: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
    ; MIPS32: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
    ; MIPS32: $a0 = COPY [[DEF]](s32)
    ; MIPS32: JAL @f_i32, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0
    ; MIPS32: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
    ; MIPS32: RetRA
    %0:_(s32) = G_IMPLICIT_DEF
    ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
    $a0 = COPY %0(s32)
    JAL @f_i32, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0
    ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
    RetRA

...
---
name:            g_i64
alignment:       2
tracksRegLiveness: true
body:             |
  bb.1.entry:
    ; MIPS32-LABEL: name: g_i64
    ; MIPS32: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
    ; MIPS32: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
    ; MIPS32: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF]](s64)
    ; MIPS32: $a0 = COPY [[UV]](s32)
    ; MIPS32: $a1 = COPY [[UV1]](s32)
    ; MIPS32: JAL @f_i64, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1
    ; MIPS32: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
    ; MIPS32: RetRA
    %0:_(s64) = G_IMPLICIT_DEF
    ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
    %1:_(s32), %2:_(s32) = G_UNMERGE_VALUES %0(s64)
    $a0 = COPY %1(s32)
    $a1 = COPY %2(s32)
    JAL @f_i64, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1
    ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
    RetRA

...
---
name:            g_float
alignment:       2
tracksRegLiveness: true
body:             |
  bb.1.entry:
    ; MIPS32-LABEL: name: g_float
    ; MIPS32: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
    ; MIPS32: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
    ; MIPS32: $f12 = COPY [[DEF]](s32)
    ; MIPS32: JAL @f_float, csr_o32, implicit-def $ra, implicit-def $sp, implicit $f12
    ; MIPS32: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
    ; MIPS32: RetRA
    %0:_(s32) = G_IMPLICIT_DEF
    ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
    $f12 = COPY %0(s32)
    JAL @f_float, csr_o32, implicit-def $ra, implicit-def $sp, implicit $f12
    ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
    RetRA

...
---
name:            g_double
alignment:       2
tracksRegLiveness: true
body:             |
  bb.1.entry:
    ; MIPS32-LABEL: name: g_double
    ; MIPS32: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
    ; MIPS32: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
    ; MIPS32: $d6 = COPY [[DEF]](s64)
    ; MIPS32: JAL @f_double, csr_o32, implicit-def $ra, implicit-def $sp, implicit $d6
    ; MIPS32: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
    ; MIPS32: RetRA
    %0:_(s64) = G_IMPLICIT_DEF
    ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
    $d6 = COPY %0(s64)
    JAL @f_double, csr_o32, implicit-def $ra, implicit-def $sp, implicit $d6
    ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
    RetRA

...
OpenPOWER on IntegriCloud