1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2# RUN: llc -march=amdgcn -mcpu=bonaire -run-pass=instruction-select -verify-machineinstrs -o - %s | FileCheck -check-prefix=GCN %s
3# RUN: llc -march=amdgcn -mcpu=fiji -run-pass=instruction-select -verify-machineinstrs -o - %s | FileCheck -check-prefix=GCN %s
4
5---
6name: frint_s32_vv
7legalized: true
8regBankSelected: true
9tracksRegLiveness: true
10
11body: |
12  bb.0:
13    liveins: $vgpr0
14
15    ; GCN-LABEL: name: frint_s32_vv
16    ; GCN: liveins: $vgpr0
17    ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
18    ; GCN: %1:vgpr_32 = nofpexcept V_RNDNE_F32_e64 0, [[COPY]], 0, 0, implicit $mode, implicit $exec
19    ; GCN: $vgpr0 = COPY %1
20    %0:vgpr(s32) = COPY $vgpr0
21    %1:vgpr(s32) = G_FRINT %0
22    $vgpr0 = COPY %1
23...
24
25---
26name: frint_s32_vs
27legalized: true
28regBankSelected: true
29tracksRegLiveness: true
30
31body: |
32  bb.0:
33    liveins: $sgpr0
34
35    ; GCN-LABEL: name: frint_s32_vs
36    ; GCN: liveins: $sgpr0
37    ; GCN: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
38    ; GCN: %1:vgpr_32 = nofpexcept V_RNDNE_F32_e64 0, [[COPY]], 0, 0, implicit $mode, implicit $exec
39    ; GCN: $vgpr0 = COPY %1
40    %0:sgpr(s32) = COPY $sgpr0
41    %1:vgpr(s32) = G_FRINT %0
42    $vgpr0 = COPY %1
43...
44
45---
46name: frint_fneg_s32_vv
47legalized: true
48regBankSelected: true
49tracksRegLiveness: true
50
51body: |
52  bb.0:
53    liveins: $vgpr0
54
55    ; GCN-LABEL: name: frint_fneg_s32_vv
56    ; GCN: liveins: $vgpr0
57    ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
58    ; GCN: %2:vgpr_32 = nofpexcept V_RNDNE_F32_e64 1, [[COPY]], 0, 0, implicit $mode, implicit $exec
59    ; GCN: $vgpr0 = COPY %2
60    %0:vgpr(s32) = COPY $vgpr0
61    %1:vgpr(s32) = G_FNEG %0
62    %2:vgpr(s32) = G_FRINT %1
63    $vgpr0 = COPY %2
64...
65
66---
67name: frint_s64_vv
68legalized: true
69regBankSelected: true
70tracksRegLiveness: true
71
72body: |
73  bb.0:
74    liveins: $vgpr0_vgpr1
75
76    ; GCN-LABEL: name: frint_s64_vv
77    ; GCN: liveins: $vgpr0_vgpr1
78    ; GCN: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
79    ; GCN: %1:vreg_64 = nofpexcept V_RNDNE_F64_e64 0, [[COPY]], 0, 0, implicit $mode, implicit $exec
80    ; GCN: $vgpr0_vgpr1 = COPY %1
81    %0:vgpr(s64) = COPY $vgpr0_vgpr1
82    %1:vgpr(s64) = G_FRINT %0
83    $vgpr0_vgpr1 = COPY %1
84...
85
86---
87name: frint_s64_fneg_vv
88legalized: true
89regBankSelected: true
90tracksRegLiveness: true
91
92body: |
93  bb.0:
94    liveins: $vgpr0_vgpr1
95
96    ; GCN-LABEL: name: frint_s64_fneg_vv
97    ; GCN: liveins: $vgpr0_vgpr1
98    ; GCN: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
99    ; GCN: %2:vreg_64 = nofpexcept V_RNDNE_F64_e64 1, [[COPY]], 0, 0, implicit $mode, implicit $exec
100    ; GCN: $vgpr0_vgpr1 = COPY %2
101    %0:vgpr(s64) = COPY $vgpr0_vgpr1
102    %1:vgpr(s64) = G_FNEG %0
103    %2:vgpr(s64) = G_FRINT %1
104    $vgpr0_vgpr1 = COPY %2
105...
106