2019-09-16 08:54:07 +08:00
|
|
|
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
|
|
|
# RUN: llc -march=amdgcn -mcpu=tahiti -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX6 %s
|
|
|
|
# RUN: llc -march=amdgcn -mcpu=hawaii -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX7 %s
|
|
|
|
# RUN: llc -march=amdgcn -mcpu=fiji -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX8 %s
|
|
|
|
# RUN: llc -march=amdgcn -mcpu=gfx1010 -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX10 %s
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
name: load_constant_s32_from_4
|
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
|
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
liveins: $sgpr0_sgpr1
|
|
|
|
|
|
|
|
; GFX6-LABEL: name: load_constant_s32_from_4
|
|
|
|
; GFX6: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX6: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX6: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
|
|
|
|
; GFX7-LABEL: name: load_constant_s32_from_4
|
|
|
|
; GFX7: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX7: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX7: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
|
|
|
|
; GFX8-LABEL: name: load_constant_s32_from_4
|
|
|
|
; GFX8: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX8: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX8: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
|
|
|
|
; GFX10-LABEL: name: load_constant_s32_from_4
|
|
|
|
; GFX10: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX10: $vcc_hi = IMPLICIT_DEF
|
|
|
|
; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX10: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX10: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
|
|
|
|
%0:sgpr(p4) = COPY $sgpr0_sgpr1
|
|
|
|
%1:sgpr(s32) = G_LOAD %0 :: (load 4, align 4, addrspace 4)
|
|
|
|
$sgpr0 = COPY %1
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
name: load_constant_v2s16_from_4
|
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
|
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
liveins: $sgpr0_sgpr1
|
|
|
|
|
|
|
|
; GFX6-LABEL: name: load_constant_v2s16_from_4
|
|
|
|
; GFX6: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX6: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX6: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
|
|
|
|
; GFX7-LABEL: name: load_constant_v2s16_from_4
|
|
|
|
; GFX7: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX7: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX7: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
|
|
|
|
; GFX8-LABEL: name: load_constant_v2s16_from_4
|
|
|
|
; GFX8: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX8: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX8: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
|
|
|
|
; GFX10-LABEL: name: load_constant_v2s16_from_4
|
|
|
|
; GFX10: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX10: $vcc_hi = IMPLICIT_DEF
|
|
|
|
; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX10: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX10: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
|
|
|
|
%0:sgpr(p4) = COPY $sgpr0_sgpr1
|
|
|
|
%1:sgpr(<2 x s16>) = G_LOAD %0 :: (load 4, align 4, addrspace 4)
|
|
|
|
$sgpr0 = COPY %1
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
name: load_constant_v2s32
|
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
liveins: $sgpr0_sgpr1
|
|
|
|
|
|
|
|
; GFX6-LABEL: name: load_constant_v2s32
|
|
|
|
; GFX6: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX6: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, addrspace 4)
|
|
|
|
; GFX6: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
|
|
|
|
; GFX7-LABEL: name: load_constant_v2s32
|
|
|
|
; GFX7: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX7: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, addrspace 4)
|
|
|
|
; GFX7: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
|
|
|
|
; GFX8-LABEL: name: load_constant_v2s32
|
|
|
|
; GFX8: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX8: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, addrspace 4)
|
|
|
|
; GFX8: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
|
|
|
|
; GFX10-LABEL: name: load_constant_v2s32
|
|
|
|
; GFX10: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX10: $vcc_hi = IMPLICIT_DEF
|
|
|
|
; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX10: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, addrspace 4)
|
|
|
|
; GFX10: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
|
|
|
|
%0:sgpr(p4) = COPY $sgpr0_sgpr1
|
|
|
|
%1:sgpr(<2 x s32>) = G_LOAD %0 :: (load 8, align 8, addrspace 4)
|
|
|
|
$sgpr0_sgpr1 = COPY %1
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
---
|
|
|
|
name: load_constant_v2s32_align4
|
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
liveins: $sgpr0_sgpr1
|
|
|
|
|
|
|
|
; GFX6-LABEL: name: load_constant_v2s32_align4
|
|
|
|
; GFX6: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX6: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, align 4, addrspace 4)
|
|
|
|
; GFX6: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
|
|
|
|
; GFX7-LABEL: name: load_constant_v2s32_align4
|
|
|
|
; GFX7: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX7: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, align 4, addrspace 4)
|
|
|
|
; GFX7: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
|
|
|
|
; GFX8-LABEL: name: load_constant_v2s32_align4
|
|
|
|
; GFX8: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX8: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, align 4, addrspace 4)
|
|
|
|
; GFX8: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
|
|
|
|
; GFX10-LABEL: name: load_constant_v2s32_align4
|
|
|
|
; GFX10: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX10: $vcc_hi = IMPLICIT_DEF
|
|
|
|
; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX10: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, align 4, addrspace 4)
|
|
|
|
; GFX10: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
|
|
|
|
%0:sgpr(p4) = COPY $sgpr0_sgpr1
|
|
|
|
%1:sgpr(<2 x s32>) = G_LOAD %0 :: (load 8, align 4, addrspace 4)
|
|
|
|
$sgpr0_sgpr1 = COPY %1
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
---
|
|
|
|
name: load_constant_v4s16_align4
|
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
liveins: $sgpr0_sgpr1
|
|
|
|
|
|
|
|
; GFX6-LABEL: name: load_constant_v4s16_align4
|
|
|
|
; GFX6: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX6: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, align 4, addrspace 4)
|
|
|
|
; GFX6: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
|
|
|
|
; GFX7-LABEL: name: load_constant_v4s16_align4
|
|
|
|
; GFX7: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX7: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, align 4, addrspace 4)
|
|
|
|
; GFX7: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
|
|
|
|
; GFX8-LABEL: name: load_constant_v4s16_align4
|
|
|
|
; GFX8: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX8: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, align 4, addrspace 4)
|
|
|
|
; GFX8: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
|
|
|
|
; GFX10-LABEL: name: load_constant_v4s16_align4
|
|
|
|
; GFX10: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX10: $vcc_hi = IMPLICIT_DEF
|
|
|
|
; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX10: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, align 4, addrspace 4)
|
|
|
|
; GFX10: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
|
|
|
|
%0:sgpr(p4) = COPY $sgpr0_sgpr1
|
|
|
|
%1:sgpr(<4 x s16>) = G_LOAD %0 :: (load 8, align 4, addrspace 4)
|
|
|
|
$sgpr0_sgpr1 = COPY %1
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
name: load_constant_v4s32_align4
|
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
liveins: $sgpr0_sgpr1
|
|
|
|
|
|
|
|
; GFX6-LABEL: name: load_constant_v4s32_align4
|
|
|
|
; GFX6: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
2019-10-10 15:11:33 +08:00
|
|
|
; GFX6: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0, 0 :: (load 16, align 4, addrspace 4)
|
2019-09-16 08:54:07 +08:00
|
|
|
; GFX6: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
|
|
|
|
; GFX7-LABEL: name: load_constant_v4s32_align4
|
|
|
|
; GFX7: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
2019-10-10 15:11:33 +08:00
|
|
|
; GFX7: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0, 0 :: (load 16, align 4, addrspace 4)
|
2019-09-16 08:54:07 +08:00
|
|
|
; GFX7: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
|
|
|
|
; GFX8-LABEL: name: load_constant_v4s32_align4
|
|
|
|
; GFX8: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
2019-10-10 15:11:33 +08:00
|
|
|
; GFX8: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0, 0 :: (load 16, align 4, addrspace 4)
|
2019-09-16 08:54:07 +08:00
|
|
|
; GFX8: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
|
|
|
|
; GFX10-LABEL: name: load_constant_v4s32_align4
|
|
|
|
; GFX10: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX10: $vcc_hi = IMPLICIT_DEF
|
|
|
|
; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
2019-10-10 15:11:33 +08:00
|
|
|
; GFX10: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0, 0 :: (load 16, align 4, addrspace 4)
|
2019-09-16 08:54:07 +08:00
|
|
|
; GFX10: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
|
|
|
|
%0:sgpr(p4) = COPY $sgpr0_sgpr1
|
|
|
|
%1:sgpr(<4 x s32>) = G_LOAD %0 :: (load 16, align 4, addrspace 4)
|
|
|
|
$sgpr0_sgpr1_sgpr2_sgpr3 = COPY %1
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
name: load_constant_s64
|
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
liveins: $sgpr0_sgpr1
|
|
|
|
|
|
|
|
; GFX6-LABEL: name: load_constant_s64
|
|
|
|
; GFX6: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX6: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, addrspace 4)
|
|
|
|
; GFX6: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
|
|
|
|
; GFX7-LABEL: name: load_constant_s64
|
|
|
|
; GFX7: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX7: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, addrspace 4)
|
|
|
|
; GFX7: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
|
|
|
|
; GFX8-LABEL: name: load_constant_s64
|
|
|
|
; GFX8: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX8: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, addrspace 4)
|
|
|
|
; GFX8: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
|
|
|
|
; GFX10-LABEL: name: load_constant_s64
|
|
|
|
; GFX10: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX10: $vcc_hi = IMPLICIT_DEF
|
|
|
|
; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX10: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, addrspace 4)
|
|
|
|
; GFX10: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
|
|
|
|
%0:sgpr(p4) = COPY $sgpr0_sgpr1
|
|
|
|
%1:sgpr(s64) = G_LOAD %0 :: (load 8, align 8, addrspace 4)
|
|
|
|
$sgpr0_sgpr1 = COPY %1
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
name: load_constant_s64_align4
|
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
liveins: $sgpr0_sgpr1
|
|
|
|
|
|
|
|
; GFX6-LABEL: name: load_constant_s64_align4
|
|
|
|
; GFX6: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX6: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, align 4, addrspace 4)
|
|
|
|
; GFX6: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
|
|
|
|
; GFX7-LABEL: name: load_constant_s64_align4
|
|
|
|
; GFX7: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX7: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, align 4, addrspace 4)
|
|
|
|
; GFX7: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
|
|
|
|
; GFX8-LABEL: name: load_constant_s64_align4
|
|
|
|
; GFX8: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX8: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, align 4, addrspace 4)
|
|
|
|
; GFX8: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
|
|
|
|
; GFX10-LABEL: name: load_constant_s64_align4
|
|
|
|
; GFX10: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX10: $vcc_hi = IMPLICIT_DEF
|
|
|
|
; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX10: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, align 4, addrspace 4)
|
|
|
|
; GFX10: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
|
|
|
|
%0:sgpr(p4) = COPY $sgpr0_sgpr1
|
|
|
|
%1:sgpr(s64) = G_LOAD %0 :: (load 8, align 4, addrspace 4)
|
|
|
|
$sgpr0_sgpr1 = COPY %1
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
name: load_constant_v2s64
|
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
liveins: $sgpr0_sgpr1
|
|
|
|
|
|
|
|
; GFX6-LABEL: name: load_constant_v2s64
|
|
|
|
; GFX6: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
2019-10-10 15:11:33 +08:00
|
|
|
; GFX6: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0, 0 :: (load 16, align 4, addrspace 4)
|
2019-09-16 08:54:07 +08:00
|
|
|
; GFX6: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
|
|
|
|
; GFX7-LABEL: name: load_constant_v2s64
|
|
|
|
; GFX7: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
2019-10-10 15:11:33 +08:00
|
|
|
; GFX7: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0, 0 :: (load 16, align 4, addrspace 4)
|
2019-09-16 08:54:07 +08:00
|
|
|
; GFX7: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
|
|
|
|
; GFX8-LABEL: name: load_constant_v2s64
|
|
|
|
; GFX8: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
2019-10-10 15:11:33 +08:00
|
|
|
; GFX8: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0, 0 :: (load 16, align 4, addrspace 4)
|
2019-09-16 08:54:07 +08:00
|
|
|
; GFX8: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
|
|
|
|
; GFX10-LABEL: name: load_constant_v2s64
|
|
|
|
; GFX10: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX10: $vcc_hi = IMPLICIT_DEF
|
|
|
|
; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
2019-10-10 15:11:33 +08:00
|
|
|
; GFX10: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0, 0 :: (load 16, align 4, addrspace 4)
|
2019-09-16 08:54:07 +08:00
|
|
|
; GFX10: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
|
|
|
|
%0:sgpr(p4) = COPY $sgpr0_sgpr1
|
|
|
|
%1:sgpr(<2 x s64>) = G_LOAD %0 :: (load 16, align 4, addrspace 4)
|
|
|
|
$sgpr0_sgpr1_sgpr2_sgpr3 = COPY %1
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
name: load_constant_v2p1
|
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
liveins: $sgpr0_sgpr1
|
|
|
|
|
|
|
|
; GFX6-LABEL: name: load_constant_v2p1
|
|
|
|
; GFX6: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX6: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
|
2019-10-10 15:11:33 +08:00
|
|
|
; GFX6: [[LOAD:%[0-9]+]]:sgpr_128(<2 x p1>) = G_LOAD [[COPY]](p4) :: (load 16, align 4, addrspace 4)
|
2019-09-16 08:54:07 +08:00
|
|
|
; GFX6: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](<2 x p1>)
|
|
|
|
; GFX7-LABEL: name: load_constant_v2p1
|
|
|
|
; GFX7: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX7: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
|
2019-10-10 15:11:33 +08:00
|
|
|
; GFX7: [[LOAD:%[0-9]+]]:sgpr_128(<2 x p1>) = G_LOAD [[COPY]](p4) :: (load 16, align 4, addrspace 4)
|
2019-09-16 08:54:07 +08:00
|
|
|
; GFX7: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](<2 x p1>)
|
|
|
|
; GFX8-LABEL: name: load_constant_v2p1
|
|
|
|
; GFX8: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX8: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
|
2019-10-10 15:11:33 +08:00
|
|
|
; GFX8: [[LOAD:%[0-9]+]]:sgpr_128(<2 x p1>) = G_LOAD [[COPY]](p4) :: (load 16, align 4, addrspace 4)
|
2019-09-16 08:54:07 +08:00
|
|
|
; GFX8: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](<2 x p1>)
|
|
|
|
; GFX10-LABEL: name: load_constant_v2p1
|
|
|
|
; GFX10: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX10: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
|
2019-10-10 15:11:33 +08:00
|
|
|
; GFX10: [[LOAD:%[0-9]+]]:sgpr_128(<2 x p1>) = G_LOAD [[COPY]](p4) :: (load 16, align 4, addrspace 4)
|
2019-09-16 08:54:07 +08:00
|
|
|
; GFX10: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](<2 x p1>)
|
|
|
|
%0:sgpr(p4) = COPY $sgpr0_sgpr1
|
|
|
|
%1:sgpr(<2 x p1>) = G_LOAD %0 :: (load 16, align 4, addrspace 4)
|
|
|
|
$sgpr0_sgpr1_sgpr2_sgpr3 = COPY %1
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
name: load_constant_s128_align4
|
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
liveins: $sgpr0_sgpr1
|
|
|
|
|
|
|
|
; GFX6-LABEL: name: load_constant_s128_align4
|
|
|
|
; GFX6: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX6: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
|
2019-10-10 15:11:33 +08:00
|
|
|
; GFX6: [[LOAD:%[0-9]+]]:sgpr_128(s128) = G_LOAD [[COPY]](p4) :: (load 16, align 4, addrspace 4)
|
2019-09-16 08:54:07 +08:00
|
|
|
; GFX6: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](s128)
|
|
|
|
; GFX7-LABEL: name: load_constant_s128_align4
|
|
|
|
; GFX7: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX7: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
|
2019-10-10 15:11:33 +08:00
|
|
|
; GFX7: [[LOAD:%[0-9]+]]:sgpr_128(s128) = G_LOAD [[COPY]](p4) :: (load 16, align 4, addrspace 4)
|
2019-09-16 08:54:07 +08:00
|
|
|
; GFX7: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](s128)
|
|
|
|
; GFX8-LABEL: name: load_constant_s128_align4
|
|
|
|
; GFX8: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX8: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
|
2019-10-10 15:11:33 +08:00
|
|
|
; GFX8: [[LOAD:%[0-9]+]]:sgpr_128(s128) = G_LOAD [[COPY]](p4) :: (load 16, align 4, addrspace 4)
|
2019-09-16 08:54:07 +08:00
|
|
|
; GFX8: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](s128)
|
|
|
|
; GFX10-LABEL: name: load_constant_s128_align4
|
|
|
|
; GFX10: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX10: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
|
2019-10-10 15:11:33 +08:00
|
|
|
; GFX10: [[LOAD:%[0-9]+]]:sgpr_128(s128) = G_LOAD [[COPY]](p4) :: (load 16, align 4, addrspace 4)
|
2019-09-16 08:54:07 +08:00
|
|
|
; GFX10: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](s128)
|
|
|
|
%0:sgpr(p4) = COPY $sgpr0_sgpr1
|
|
|
|
%1:sgpr(s128) = G_LOAD %0 :: (load 16, align 4, addrspace 4)
|
|
|
|
$sgpr0_sgpr1_sgpr2_sgpr3 = COPY %1
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
name: load_constant_p3_from_4
|
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
liveins: $sgpr0_sgpr1
|
|
|
|
|
|
|
|
; GFX6-LABEL: name: load_constant_p3_from_4
|
|
|
|
; GFX6: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX6: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX6: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
|
|
|
|
; GFX7-LABEL: name: load_constant_p3_from_4
|
|
|
|
; GFX7: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX7: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX7: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
|
|
|
|
; GFX8-LABEL: name: load_constant_p3_from_4
|
|
|
|
; GFX8: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX8: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX8: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
|
|
|
|
; GFX10-LABEL: name: load_constant_p3_from_4
|
|
|
|
; GFX10: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX10: $vcc_hi = IMPLICIT_DEF
|
|
|
|
; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX10: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX10: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
|
|
|
|
%0:sgpr(p4) = COPY $sgpr0_sgpr1
|
|
|
|
%1:sgpr(p3) = G_LOAD %0 :: (load 4, align 4, addrspace 4)
|
|
|
|
$sgpr0 = COPY %1
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
name: load_constant_p1_from_8
|
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
liveins: $sgpr0_sgpr1
|
|
|
|
|
|
|
|
; GFX6-LABEL: name: load_constant_p1_from_8
|
|
|
|
; GFX6: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX6: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, addrspace 4)
|
|
|
|
; GFX6: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
|
|
|
|
; GFX7-LABEL: name: load_constant_p1_from_8
|
|
|
|
; GFX7: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX7: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, addrspace 4)
|
|
|
|
; GFX7: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
|
|
|
|
; GFX8-LABEL: name: load_constant_p1_from_8
|
|
|
|
; GFX8: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX8: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, addrspace 4)
|
|
|
|
; GFX8: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
|
|
|
|
; GFX10-LABEL: name: load_constant_p1_from_8
|
|
|
|
; GFX10: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX10: $vcc_hi = IMPLICIT_DEF
|
|
|
|
; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX10: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, addrspace 4)
|
|
|
|
; GFX10: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
|
|
|
|
%0:sgpr(p4) = COPY $sgpr0_sgpr1
|
|
|
|
%1:sgpr(p4) = G_LOAD %0 :: (load 8, align 8, addrspace 4)
|
|
|
|
$sgpr0_sgpr1 = COPY %1
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
name: load_constant_p999_from_8
|
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
liveins: $sgpr0_sgpr1
|
|
|
|
|
|
|
|
; GFX6-LABEL: name: load_constant_p999_from_8
|
|
|
|
; GFX6: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX6: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
|
|
|
|
; GFX6: [[LOAD:%[0-9]+]]:sreg_64_xexec(p999) = G_LOAD [[COPY]](p4) :: (load 8, addrspace 4)
|
|
|
|
; GFX6: $sgpr0_sgpr1 = COPY [[LOAD]](p999)
|
|
|
|
; GFX7-LABEL: name: load_constant_p999_from_8
|
|
|
|
; GFX7: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX7: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
|
|
|
|
; GFX7: [[LOAD:%[0-9]+]]:sreg_64_xexec(p999) = G_LOAD [[COPY]](p4) :: (load 8, addrspace 4)
|
|
|
|
; GFX7: $sgpr0_sgpr1 = COPY [[LOAD]](p999)
|
|
|
|
; GFX8-LABEL: name: load_constant_p999_from_8
|
|
|
|
; GFX8: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX8: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
|
|
|
|
; GFX8: [[LOAD:%[0-9]+]]:sreg_64_xexec(p999) = G_LOAD [[COPY]](p4) :: (load 8, addrspace 4)
|
|
|
|
; GFX8: $sgpr0_sgpr1 = COPY [[LOAD]](p999)
|
|
|
|
; GFX10-LABEL: name: load_constant_p999_from_8
|
|
|
|
; GFX10: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX10: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
|
|
|
|
; GFX10: [[LOAD:%[0-9]+]]:sreg_64_xexec(p999) = G_LOAD [[COPY]](p4) :: (load 8, addrspace 4)
|
|
|
|
; GFX10: $sgpr0_sgpr1 = COPY [[LOAD]](p999)
|
|
|
|
%0:sgpr(p4) = COPY $sgpr0_sgpr1
|
|
|
|
%1:sgpr(p999) = G_LOAD %0 :: (load 8, align 8, addrspace 4)
|
|
|
|
$sgpr0_sgpr1 = COPY %1
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
name: load_constant_v2p3
|
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
liveins: $sgpr0_sgpr1
|
|
|
|
|
|
|
|
; GFX6-LABEL: name: load_constant_v2p3
|
|
|
|
; GFX6: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX6: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
|
|
|
|
; GFX6: [[LOAD:%[0-9]+]]:sreg_64_xexec(<2 x p3>) = G_LOAD [[COPY]](p4) :: (load 8, addrspace 4)
|
|
|
|
; GFX6: $sgpr0_sgpr1 = COPY [[LOAD]](<2 x p3>)
|
|
|
|
; GFX7-LABEL: name: load_constant_v2p3
|
|
|
|
; GFX7: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX7: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
|
|
|
|
; GFX7: [[LOAD:%[0-9]+]]:sreg_64_xexec(<2 x p3>) = G_LOAD [[COPY]](p4) :: (load 8, addrspace 4)
|
|
|
|
; GFX7: $sgpr0_sgpr1 = COPY [[LOAD]](<2 x p3>)
|
|
|
|
; GFX8-LABEL: name: load_constant_v2p3
|
|
|
|
; GFX8: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX8: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
|
|
|
|
; GFX8: [[LOAD:%[0-9]+]]:sreg_64_xexec(<2 x p3>) = G_LOAD [[COPY]](p4) :: (load 8, addrspace 4)
|
|
|
|
; GFX8: $sgpr0_sgpr1 = COPY [[LOAD]](<2 x p3>)
|
|
|
|
; GFX10-LABEL: name: load_constant_v2p3
|
|
|
|
; GFX10: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX10: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
|
|
|
|
; GFX10: [[LOAD:%[0-9]+]]:sreg_64_xexec(<2 x p3>) = G_LOAD [[COPY]](p4) :: (load 8, addrspace 4)
|
|
|
|
; GFX10: $sgpr0_sgpr1 = COPY [[LOAD]](<2 x p3>)
|
|
|
|
%0:sgpr(p4) = COPY $sgpr0_sgpr1
|
|
|
|
%1:sgpr(<2 x p3>) = G_LOAD %0 :: (load 8, align 8, addrspace 4)
|
|
|
|
$sgpr0_sgpr1 = COPY %1
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
name: load_constant_v2s16
|
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
liveins: $sgpr0_sgpr1
|
|
|
|
|
|
|
|
; GFX6-LABEL: name: load_constant_v2s16
|
|
|
|
; GFX6: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX6: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX6: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
|
|
|
|
; GFX7-LABEL: name: load_constant_v2s16
|
|
|
|
; GFX7: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX7: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX7: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
|
|
|
|
; GFX8-LABEL: name: load_constant_v2s16
|
|
|
|
; GFX8: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX8: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX8: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
|
|
|
|
; GFX10-LABEL: name: load_constant_v2s16
|
|
|
|
; GFX10: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX10: $vcc_hi = IMPLICIT_DEF
|
|
|
|
; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX10: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX10: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
|
|
|
|
%0:sgpr(p4) = COPY $sgpr0_sgpr1
|
|
|
|
%1:sgpr(<2 x s16>) = G_LOAD %0 :: (load 4, align 4, addrspace 4)
|
|
|
|
$sgpr0 = COPY %1
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
name: load_constant_v4s16
|
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
liveins: $sgpr0_sgpr1
|
|
|
|
|
|
|
|
; GFX6-LABEL: name: load_constant_v4s16
|
|
|
|
; GFX6: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX6: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, addrspace 4)
|
|
|
|
; GFX6: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
|
|
|
|
; GFX7-LABEL: name: load_constant_v4s16
|
|
|
|
; GFX7: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX7: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, addrspace 4)
|
|
|
|
; GFX7: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
|
|
|
|
; GFX8-LABEL: name: load_constant_v4s16
|
|
|
|
; GFX8: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX8: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, addrspace 4)
|
|
|
|
; GFX8: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
|
|
|
|
; GFX10-LABEL: name: load_constant_v4s16
|
|
|
|
; GFX10: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX10: $vcc_hi = IMPLICIT_DEF
|
|
|
|
; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX10: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, addrspace 4)
|
|
|
|
; GFX10: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
|
|
|
|
%0:sgpr(p4) = COPY $sgpr0_sgpr1
|
|
|
|
%1:sgpr(<4 x s16>) = G_LOAD %0 :: (load 8, align 8, addrspace 4)
|
|
|
|
$sgpr0_sgpr1 = COPY %1
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
name: load_constant_v8s16
|
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
liveins: $sgpr0_sgpr1
|
|
|
|
|
|
|
|
; GFX6-LABEL: name: load_constant_v8s16
|
|
|
|
; GFX6: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX6: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
|
2019-10-10 15:11:33 +08:00
|
|
|
; GFX6: [[LOAD:%[0-9]+]]:sgpr_128(<8 x s16>) = G_LOAD [[COPY]](p4) :: (load 16, align 4, addrspace 4)
|
2019-09-16 08:54:07 +08:00
|
|
|
; GFX6: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](<8 x s16>)
|
|
|
|
; GFX7-LABEL: name: load_constant_v8s16
|
|
|
|
; GFX7: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX7: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
|
2019-10-10 15:11:33 +08:00
|
|
|
; GFX7: [[LOAD:%[0-9]+]]:sgpr_128(<8 x s16>) = G_LOAD [[COPY]](p4) :: (load 16, align 4, addrspace 4)
|
2019-09-16 08:54:07 +08:00
|
|
|
; GFX7: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](<8 x s16>)
|
|
|
|
; GFX8-LABEL: name: load_constant_v8s16
|
|
|
|
; GFX8: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX8: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
|
2019-10-10 15:11:33 +08:00
|
|
|
; GFX8: [[LOAD:%[0-9]+]]:sgpr_128(<8 x s16>) = G_LOAD [[COPY]](p4) :: (load 16, align 4, addrspace 4)
|
2019-09-16 08:54:07 +08:00
|
|
|
; GFX8: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](<8 x s16>)
|
|
|
|
; GFX10-LABEL: name: load_constant_v8s16
|
|
|
|
; GFX10: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX10: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
|
2019-10-10 15:11:33 +08:00
|
|
|
; GFX10: [[LOAD:%[0-9]+]]:sgpr_128(<8 x s16>) = G_LOAD [[COPY]](p4) :: (load 16, align 4, addrspace 4)
|
2019-09-16 08:54:07 +08:00
|
|
|
; GFX10: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](<8 x s16>)
|
|
|
|
%0:sgpr(p4) = COPY $sgpr0_sgpr1
|
|
|
|
%1:sgpr(<8 x s16>) = G_LOAD %0 :: (load 16, align 4, addrspace 4)
|
|
|
|
$sgpr0_sgpr1_sgpr2_sgpr3 = COPY %1
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
### Stress addressing modes
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
name: load_constant_s32_from_4_gep_1020
|
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
liveins: $sgpr0_sgpr1
|
|
|
|
|
|
|
|
; GFX6-LABEL: name: load_constant_s32_from_4_gep_1020
|
|
|
|
; GFX6: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX6: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 255, 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX6: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
|
|
|
|
; GFX7-LABEL: name: load_constant_s32_from_4_gep_1020
|
|
|
|
; GFX7: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX7: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 255, 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX7: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
|
|
|
|
; GFX8-LABEL: name: load_constant_s32_from_4_gep_1020
|
|
|
|
; GFX8: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX8: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 1020, 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX8: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
|
|
|
|
; GFX10-LABEL: name: load_constant_s32_from_4_gep_1020
|
|
|
|
; GFX10: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX10: $vcc_hi = IMPLICIT_DEF
|
|
|
|
; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX10: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 1020, 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX10: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
|
|
|
|
%0:sgpr(p4) = COPY $sgpr0_sgpr1
|
|
|
|
%1:sgpr(s64) = G_CONSTANT i64 1020
|
[globalisel] Rename G_GEP to G_PTR_ADD
Summary:
G_GEP is rather poorly named. It's a simple pointer+scalar addition and
doesn't support any of the complexities of getelementptr. I therefore
propose that we rename it. There's a G_PTR_MASK so let's follow that
convention and go with G_PTR_ADD
Reviewers: volkan, aditya_nandakumar, bogner, rovka, arsenm
Subscribers: sdardis, jvesely, wdng, nhaehnle, hiraditya, jrtc27, atanasyan, arphaman, Petar.Avramovic, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69734
2019-11-02 04:18:00 +08:00
|
|
|
%2:sgpr(p4) = G_PTR_ADD %0, %1
|
2019-09-16 08:54:07 +08:00
|
|
|
%3:sgpr(s32) = G_LOAD %2 :: (load 4, align 4, addrspace 4)
|
|
|
|
$sgpr0 = COPY %3
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
name: load_constant_s32_from_4_gep_1024
|
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
liveins: $sgpr0_sgpr1
|
|
|
|
|
|
|
|
; GFX6-LABEL: name: load_constant_s32_from_4_gep_1024
|
|
|
|
; GFX6: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
2019-10-19 02:26:37 +08:00
|
|
|
; GFX6: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1024
|
2019-09-16 08:54:07 +08:00
|
|
|
; GFX6: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX6: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
|
|
|
|
; GFX7-LABEL: name: load_constant_s32_from_4_gep_1024
|
|
|
|
; GFX7: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX7: [[S_LOAD_DWORD_IMM_ci:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM_ci [[COPY]], 256, 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX7: $sgpr0 = COPY [[S_LOAD_DWORD_IMM_ci]]
|
|
|
|
; GFX8-LABEL: name: load_constant_s32_from_4_gep_1024
|
|
|
|
; GFX8: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX8: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 1024, 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX8: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
|
|
|
|
; GFX10-LABEL: name: load_constant_s32_from_4_gep_1024
|
|
|
|
; GFX10: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX10: $vcc_hi = IMPLICIT_DEF
|
|
|
|
; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX10: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 1024, 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX10: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
|
|
|
|
%0:sgpr(p4) = COPY $sgpr0_sgpr1
|
|
|
|
%1:sgpr(s64) = G_CONSTANT i64 1024
|
[globalisel] Rename G_GEP to G_PTR_ADD
Summary:
G_GEP is rather poorly named. It's a simple pointer+scalar addition and
doesn't support any of the complexities of getelementptr. I therefore
propose that we rename it. There's a G_PTR_MASK so let's follow that
convention and go with G_PTR_ADD
Reviewers: volkan, aditya_nandakumar, bogner, rovka, arsenm
Subscribers: sdardis, jvesely, wdng, nhaehnle, hiraditya, jrtc27, atanasyan, arphaman, Petar.Avramovic, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69734
2019-11-02 04:18:00 +08:00
|
|
|
%2:sgpr(p4) = G_PTR_ADD %0, %1
|
2019-09-16 08:54:07 +08:00
|
|
|
%3:sgpr(s32) = G_LOAD %2 :: (load 4, align 4, addrspace 4)
|
|
|
|
$sgpr0 = COPY %3
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
name: load_constant_s32_from_4_gep_1048575
|
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
liveins: $sgpr0_sgpr1
|
|
|
|
|
|
|
|
; GFX6-LABEL: name: load_constant_s32_from_4_gep_1048575
|
|
|
|
; GFX6: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
2019-10-19 02:26:37 +08:00
|
|
|
; GFX6: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1048575
|
2019-09-16 08:54:07 +08:00
|
|
|
; GFX6: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX6: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
|
|
|
|
; GFX7-LABEL: name: load_constant_s32_from_4_gep_1048575
|
|
|
|
; GFX7: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX7: [[S_LOAD_DWORD_IMM_ci:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM_ci [[COPY]], 262143, 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX7: $sgpr0 = COPY [[S_LOAD_DWORD_IMM_ci]]
|
|
|
|
; GFX8-LABEL: name: load_constant_s32_from_4_gep_1048575
|
|
|
|
; GFX8: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX8: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 1048575, 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX8: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
|
|
|
|
; GFX10-LABEL: name: load_constant_s32_from_4_gep_1048575
|
|
|
|
; GFX10: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX10: $vcc_hi = IMPLICIT_DEF
|
|
|
|
; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX10: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 1048575, 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX10: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
|
|
|
|
%0:sgpr(p4) = COPY $sgpr0_sgpr1
|
|
|
|
%1:sgpr(s64) = G_CONSTANT i64 1048575
|
[globalisel] Rename G_GEP to G_PTR_ADD
Summary:
G_GEP is rather poorly named. It's a simple pointer+scalar addition and
doesn't support any of the complexities of getelementptr. I therefore
propose that we rename it. There's a G_PTR_MASK so let's follow that
convention and go with G_PTR_ADD
Reviewers: volkan, aditya_nandakumar, bogner, rovka, arsenm
Subscribers: sdardis, jvesely, wdng, nhaehnle, hiraditya, jrtc27, atanasyan, arphaman, Petar.Avramovic, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69734
2019-11-02 04:18:00 +08:00
|
|
|
%2:sgpr(p4) = G_PTR_ADD %0, %1
|
2019-09-16 08:54:07 +08:00
|
|
|
%3:sgpr(s32) = G_LOAD %2 :: (load 4, align 4, addrspace 4)
|
|
|
|
$sgpr0 = COPY %3
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
name: load_constant_s32_from_4_gep_1048576
|
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
liveins: $sgpr0_sgpr1
|
|
|
|
|
|
|
|
; GFX6-LABEL: name: load_constant_s32_from_4_gep_1048576
|
|
|
|
; GFX6: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
2019-10-19 02:26:37 +08:00
|
|
|
; GFX6: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1048576
|
2019-09-16 08:54:07 +08:00
|
|
|
; GFX6: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX6: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
|
|
|
|
; GFX7-LABEL: name: load_constant_s32_from_4_gep_1048576
|
|
|
|
; GFX7: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX7: [[S_LOAD_DWORD_IMM_ci:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM_ci [[COPY]], 262144, 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX7: $sgpr0 = COPY [[S_LOAD_DWORD_IMM_ci]]
|
|
|
|
; GFX8-LABEL: name: load_constant_s32_from_4_gep_1048576
|
|
|
|
; GFX8: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
2019-10-19 02:26:37 +08:00
|
|
|
; GFX8: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1048576
|
2019-09-16 08:54:07 +08:00
|
|
|
; GFX8: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX8: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
|
|
|
|
; GFX10-LABEL: name: load_constant_s32_from_4_gep_1048576
|
|
|
|
; GFX10: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX10: $vcc_hi = IMPLICIT_DEF
|
|
|
|
; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
2019-10-19 02:26:37 +08:00
|
|
|
; GFX10: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1048576
|
2019-09-16 08:54:07 +08:00
|
|
|
; GFX10: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX10: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
|
|
|
|
%0:sgpr(p4) = COPY $sgpr0_sgpr1
|
|
|
|
%1:sgpr(s64) = G_CONSTANT i64 1048576
|
[globalisel] Rename G_GEP to G_PTR_ADD
Summary:
G_GEP is rather poorly named. It's a simple pointer+scalar addition and
doesn't support any of the complexities of getelementptr. I therefore
propose that we rename it. There's a G_PTR_MASK so let's follow that
convention and go with G_PTR_ADD
Reviewers: volkan, aditya_nandakumar, bogner, rovka, arsenm
Subscribers: sdardis, jvesely, wdng, nhaehnle, hiraditya, jrtc27, atanasyan, arphaman, Petar.Avramovic, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69734
2019-11-02 04:18:00 +08:00
|
|
|
%2:sgpr(p4) = G_PTR_ADD %0, %1
|
2019-09-16 08:54:07 +08:00
|
|
|
%3:sgpr(s32) = G_LOAD %2 :: (load 4, align 4, addrspace 4)
|
|
|
|
$sgpr0 = COPY %3
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
name: load_constant_s32_from_4_gep_1073741823
|
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
liveins: $sgpr0_sgpr1
|
|
|
|
|
|
|
|
; GFX6-LABEL: name: load_constant_s32_from_4_gep_1073741823
|
|
|
|
; GFX6: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
2019-10-19 02:26:37 +08:00
|
|
|
; GFX6: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1073741823
|
2019-09-16 08:54:07 +08:00
|
|
|
; GFX6: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX6: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
|
|
|
|
; GFX7-LABEL: name: load_constant_s32_from_4_gep_1073741823
|
|
|
|
; GFX7: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
|
|
|
; GFX7: [[S_LOAD_DWORD_IMM_ci:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM_ci [[COPY]], 268435455, 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX7: $sgpr0 = COPY [[S_LOAD_DWORD_IMM_ci]]
|
|
|
|
; GFX8-LABEL: name: load_constant_s32_from_4_gep_1073741823
|
|
|
|
; GFX8: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
2019-10-19 02:26:37 +08:00
|
|
|
; GFX8: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1073741823
|
2019-09-16 08:54:07 +08:00
|
|
|
; GFX8: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX8: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
|
|
|
|
; GFX10-LABEL: name: load_constant_s32_from_4_gep_1073741823
|
|
|
|
; GFX10: liveins: $sgpr0_sgpr1
|
|
|
|
; GFX10: $vcc_hi = IMPLICIT_DEF
|
|
|
|
; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
|
2019-10-19 02:26:37 +08:00
|
|
|
; GFX10: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1073741823
|
2019-09-16 08:54:07 +08:00
|
|
|
; GFX10: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0, 0 :: (load 4, addrspace 4)
|
|
|
|
; GFX10: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
|
|
|
|
%0:sgpr(p4) = COPY $sgpr0_sgpr1
|
|
|
|
%1:sgpr(s64) = G_CONSTANT i64 1073741823
|
[globalisel] Rename G_GEP to G_PTR_ADD
Summary:
G_GEP is rather poorly named. It's a simple pointer+scalar addition and
doesn't support any of the complexities of getelementptr. I therefore
propose that we rename it. There's a G_PTR_MASK so let's follow that
convention and go with G_PTR_ADD
Reviewers: volkan, aditya_nandakumar, bogner, rovka, arsenm
Subscribers: sdardis, jvesely, wdng, nhaehnle, hiraditya, jrtc27, atanasyan, arphaman, Petar.Avramovic, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69734
2019-11-02 04:18:00 +08:00
|
|
|
%2:sgpr(p4) = G_PTR_ADD %0, %1
|
2019-09-16 08:54:07 +08:00
|
|
|
%3:sgpr(s32) = G_LOAD %2 :: (load 4, align 4, addrspace 4)
|
|
|
|
$sgpr0 = COPY %3
|
|
|
|
|
|
|
|
...
|