1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=tahiti -O0 -run-pass=legalizer %s -o - | FileCheck -check-prefix=SI %s
3 # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -O0 -run-pass=legalizer %s -o - | FileCheck -check-prefix=VI %s
6 name: test_fconstant_s32
10 ; SI-LABEL: name: test_fconstant_s32
11 ; SI: [[C:%[0-9]+]]:_(s32) = G_FCONSTANT float 1.000000e+00
12 ; SI: $vgpr0 = COPY [[C]](s32)
13 ; VI-LABEL: name: test_fconstant_s32
14 ; VI: [[C:%[0-9]+]]:_(s32) = G_FCONSTANT float 1.000000e+00
15 ; VI: $vgpr0 = COPY [[C]](s32)
16 %0:_(s32) = G_FCONSTANT float 1.0
20 name: test_fconstant_s64
24 ; SI-LABEL: name: test_fconstant_s64
25 ; SI: [[C:%[0-9]+]]:_(s64) = G_FCONSTANT double 1.000000e+00
26 ; SI: $vgpr0_vgpr1 = COPY [[C]](s64)
27 ; VI-LABEL: name: test_fconstant_s64
28 ; VI: [[C:%[0-9]+]]:_(s64) = G_FCONSTANT double 1.000000e+00
29 ; VI: $vgpr0_vgpr1 = COPY [[C]](s64)
30 %0:_(s64) = G_FCONSTANT double 1.0
31 $vgpr0_vgpr1 = COPY %0
35 name: test_fconstant_s16
39 ; SI-LABEL: name: test_fconstant_s16
40 ; SI: [[C:%[0-9]+]]:_(s32) = G_FCONSTANT float 1.000000e+00
41 ; SI: [[FPTRUNC:%[0-9]+]]:_(s16) = G_FPTRUNC [[C]](s32)
42 ; SI: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[FPTRUNC]](s16)
43 ; SI: $vgpr0 = COPY [[ANYEXT]](s32)
44 ; VI-LABEL: name: test_fconstant_s16
45 ; VI: [[C:%[0-9]+]]:_(s16) = G_FCONSTANT half 0xH3C00
46 ; VI: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[C]](s16)
47 ; VI: $vgpr0 = COPY [[ANYEXT]](s32)
48 %0:_(s16) = G_FCONSTANT half 1.0
49 %1:_(s32) = G_ANYEXT %0