1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2# RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -O0 -run-pass=legalizer %s -o - | FileCheck %s
3
4---
5name:            test_constant_i32
6body: |
7  bb.0:
8
9    ; CHECK-LABEL: name: test_constant_i32
10    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 5
11    ; CHECK: $vgpr0 = COPY [[C]](s32)
12    %0:_(s32) = G_CONSTANT i32 5
13    $vgpr0 = COPY %0
14...
15---
16name:            test_constant_i64
17body: |
18  bb.0:
19
20    ; CHECK-LABEL: name: test_constant_i64
21    ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 5
22    ; CHECK: $vgpr0_vgpr1 = COPY [[C]](s64)
23    %0:_(s64) = G_CONSTANT i64 5
24    $vgpr0_vgpr1 = COPY %0
25
26...
27---
28name:            test_fconstant_f32
29body: |
30  bb.0:
31
32    ; CHECK-LABEL: name: test_fconstant_f32
33    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_FCONSTANT float 1.000000e+00
34    ; CHECK: $vgpr0 = COPY [[C]](s32)
35    %0:_(s32) = G_FCONSTANT float 1.0
36    $vgpr0 = COPY %0
37...
38---
39name:            test_fconstant_f64
40body: |
41  bb.0:
42
43    ; CHECK-LABEL: name: test_fconstant_f64
44    ; CHECK: [[C:%[0-9]+]]:_(s64) = G_FCONSTANT double 1.000000e+00
45    ; CHECK: $vgpr0_vgpr1 = COPY [[C]](s64)
46    %0:_(s64) = G_FCONSTANT double 1.0
47    $vgpr0_vgpr1 = COPY %0
48...
49
50---
51name:            test_constant_1
52body: |
53  bb.0:
54
55    ; CHECK-LABEL: name: test_constant_1
56    ; CHECK: [[C:%[0-9]+]]:_(s1) = G_CONSTANT i1 false
57    ; CHECK: S_ENDPGM implicit [[C]](s1)
58    %1:_(s1) = G_CONSTANT i1 0
59    S_ENDPGM implicit %1
60...
61