2019-07-09 22:30:57 +08:00
|
|
|
# RUN: llc -march=amdgcn -mcpu=hawaii -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=GCN
|
2018-05-16 01:57:09 +08:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
name: constant
|
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
2019-10-08 03:07:19 +08:00
|
|
|
tracksRegLiveness: true
|
2018-05-16 01:57:09 +08:00
|
|
|
|
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
|
|
|
|
; GCN-LABEL: name: constant
|
2019-01-27 23:57:23 +08:00
|
|
|
%0:vgpr(p1) = COPY $vgpr0_vgpr1
|
|
|
|
%1:vgpr(p1) = COPY $vgpr2_vgpr3
|
2018-05-16 01:57:09 +08:00
|
|
|
|
|
|
|
; GCN: %{{[0-9]+}}:sreg_32 = S_MOV_B32 1
|
|
|
|
%2:sreg_32(s32) = G_CONSTANT i32 1
|
|
|
|
|
2019-10-19 02:26:37 +08:00
|
|
|
; GCN: [[LO0:%[0-9]+]]:sreg_32 = S_MOV_B32 0
|
|
|
|
; GCN: [[HI0:%[0-9]+]]:sreg_32 = S_MOV_B32 1
|
2020-01-13 06:10:18 +08:00
|
|
|
; GCN: %{{[0-9]+}}:sreg_64 = REG_SEQUENCE [[LO0]], %subreg.sub0, [[HI0]], %subreg.sub1
|
2018-05-16 01:57:09 +08:00
|
|
|
%3:sgpr(s64) = G_CONSTANT i64 4294967296
|
|
|
|
|
|
|
|
; GCN: %{{[0-9]+}}:sreg_32 = S_MOV_B32 1065353216
|
|
|
|
%4:sgpr(s32) = G_FCONSTANT float 1.0
|
|
|
|
|
2020-01-13 06:10:18 +08:00
|
|
|
; GCN: %5:sreg_64 = S_MOV_B64 4607182418800017408
|
2019-10-08 03:07:19 +08:00
|
|
|
%5:sgpr(s64) = G_FCONSTANT double 1.0
|
|
|
|
|
2019-10-19 02:26:37 +08:00
|
|
|
; GCN: [[LO1:%[0-9]+]]:sreg_32 = S_MOV_B32 0
|
|
|
|
; GCN: [[HI1:%[0-9]+]]:sreg_32 = S_MOV_B32 1076101120
|
2020-01-13 06:10:18 +08:00
|
|
|
; GCN: %{{[0-9]+}}:sreg_64 = REG_SEQUENCE [[LO1]], %subreg.sub0, [[HI1]], %subreg.sub1
|
2019-10-08 03:07:19 +08:00
|
|
|
%6:sgpr(s64) = G_FCONSTANT double 10.0
|
2018-05-16 01:57:09 +08:00
|
|
|
|
|
|
|
; GCN: %{{[0-9]+}}:vgpr_32 = V_MOV_B32_e32 1
|
2019-10-08 03:07:19 +08:00
|
|
|
%7:vgpr(s32) = G_CONSTANT i32 1
|
2018-05-16 01:57:09 +08:00
|
|
|
|
|
|
|
; GCN: [[LO2:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0
|
|
|
|
; GCN: [[HI2:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 1
|
|
|
|
; GCN: %{{[0-9]+}}:vreg_64 = REG_SEQUENCE [[LO2]], %subreg.sub0, [[HI2]], %subreg.sub1
|
2019-10-08 03:07:19 +08:00
|
|
|
%8:vgpr(s64) = G_CONSTANT i64 4294967296
|
2018-05-16 01:57:09 +08:00
|
|
|
|
|
|
|
; GCN: %{{[0-9]+}}:vgpr_32 = V_MOV_B32_e32 1065353216
|
2019-10-08 03:07:19 +08:00
|
|
|
%9:vgpr(s32) = G_FCONSTANT float 1.0
|
2018-05-16 01:57:09 +08:00
|
|
|
|
|
|
|
; GCN: [[LO3:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0
|
|
|
|
; GCN: [[HI3:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 1072693248
|
|
|
|
; GCN: %{{[0-9]+}}:vreg_64 = REG_SEQUENCE [[LO3]], %subreg.sub0, [[HI3]], %subreg.sub1
|
2019-10-08 03:07:19 +08:00
|
|
|
%10:vgpr(s64) = G_FCONSTANT double 1.0
|
2018-05-16 01:57:09 +08:00
|
|
|
|
2019-10-08 03:07:19 +08:00
|
|
|
S_ENDPGM 0, implicit %2, implicit %4, implicit %5, implicit %6, implicit %8, implicit %3, implicit %5, implicit %7, implicit %9, implicit %10
|
2019-07-09 22:30:57 +08:00
|
|
|
|
2018-05-16 01:57:09 +08:00
|
|
|
...
|