You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
234 lines
8.3 KiB
234 lines
8.3 KiB
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
|
# RUN: llc -amdgpu-global-isel-new-legality -march=amdgcn -mcpu=hawaii -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX7 %s
|
|
# RUN: llc -amdgpu-global-isel-new-legality -march=amdgcn -mcpu=gfx900 -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX9 %s
|
|
|
|
---
|
|
|
|
name: load_local_v4s32_align16
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
|
|
; GFX7-LABEL: name: load_local_v4s32_align16
|
|
; GFX7: liveins: $vgpr0
|
|
; GFX7: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
|
|
; GFX7: $m0 = S_MOV_B32 -1
|
|
; GFX7: [[DS_READ_B128_:%[0-9]+]]:vreg_128 = DS_READ_B128 [[COPY]], 0, 0, implicit $m0, implicit $exec :: (load 16, addrspace 3)
|
|
; GFX7: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[DS_READ_B128_]]
|
|
; GFX9-LABEL: name: load_local_v4s32_align16
|
|
; GFX9: liveins: $vgpr0
|
|
; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
|
|
; GFX9: [[DS_READ_B128_gfx9_:%[0-9]+]]:vreg_128 = DS_READ_B128_gfx9 [[COPY]], 0, 0, implicit $exec :: (load 16, addrspace 3)
|
|
; GFX9: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[DS_READ_B128_gfx9_]]
|
|
%0:vgpr(p3) = COPY $vgpr0
|
|
%1:vgpr(<4 x s32>) = G_LOAD %0 :: (load 16, align 16, addrspace 3)
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %1
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: load_local_v4s32_align_8
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
|
|
; GFX7-LABEL: name: load_local_v4s32_align_8
|
|
; GFX7: liveins: $vgpr0
|
|
; GFX7: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
|
|
; GFX7: $m0 = S_MOV_B32 -1
|
|
; GFX7: [[DS_READ2_B64_:%[0-9]+]]:vreg_128 = DS_READ2_B64 [[COPY]], 0, 1, 0, implicit $m0, implicit $exec :: (load 16, align 8, addrspace 3)
|
|
; GFX7: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[DS_READ2_B64_]]
|
|
; GFX9-LABEL: name: load_local_v4s32_align_8
|
|
; GFX9: liveins: $vgpr0
|
|
; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
|
|
; GFX9: [[DS_READ_B128_gfx9_:%[0-9]+]]:vreg_128 = DS_READ_B128_gfx9 [[COPY]], 0, 0, implicit $exec :: (load 16, align 8, addrspace 3)
|
|
; GFX9: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[DS_READ_B128_gfx9_]]
|
|
%0:vgpr(p3) = COPY $vgpr0
|
|
%1:vgpr(<4 x s32>) = G_LOAD %0 :: (load 16, align 8, addrspace 3)
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %1
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: load_local_v4s32_align_8_offset_160
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
|
|
; GFX7-LABEL: name: load_local_v4s32_align_8_offset_160
|
|
; GFX7: liveins: $vgpr0
|
|
; GFX7: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
|
|
; GFX7: $m0 = S_MOV_B32 -1
|
|
; GFX7: [[DS_READ2_B64_:%[0-9]+]]:vreg_128 = DS_READ2_B64 [[COPY]], 50, 51, 0, implicit $m0, implicit $exec :: (load 16, align 8, addrspace 3)
|
|
; GFX7: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[DS_READ2_B64_]]
|
|
; GFX9-LABEL: name: load_local_v4s32_align_8_offset_160
|
|
; GFX9: liveins: $vgpr0
|
|
; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
|
|
; GFX9: [[DS_READ_B128_gfx9_:%[0-9]+]]:vreg_128 = DS_READ_B128_gfx9 [[COPY]], 400, 0, implicit $exec :: (load 16, align 8, addrspace 3)
|
|
; GFX9: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[DS_READ_B128_gfx9_]]
|
|
%0:vgpr(p3) = COPY $vgpr0
|
|
%1:vgpr(s32) = G_CONSTANT i32 400
|
|
%2:vgpr(p3) = G_PTR_ADD %0, %1
|
|
%3:vgpr(<4 x s32>) = G_LOAD %2 :: (load 16, align 8, addrspace 3)
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %3
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: load_local_v4s32_align_8_offset_320
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
|
|
; GFX7-LABEL: name: load_local_v4s32_align_8_offset_320
|
|
; GFX7: liveins: $vgpr0
|
|
; GFX7: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
|
|
; GFX7: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4000, implicit $exec
|
|
; GFX7: %2:vgpr_32, dead %4:sreg_64_xexec = V_ADD_CO_U32_e64 [[COPY]], [[V_MOV_B32_e32_]], 0, implicit $exec
|
|
; GFX7: $m0 = S_MOV_B32 -1
|
|
; GFX7: [[DS_READ2_B64_:%[0-9]+]]:vreg_128 = DS_READ2_B64 %2, 0, 1, 0, implicit $m0, implicit $exec :: (load 16, align 8, addrspace 3)
|
|
; GFX7: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[DS_READ2_B64_]]
|
|
; GFX9-LABEL: name: load_local_v4s32_align_8_offset_320
|
|
; GFX9: liveins: $vgpr0
|
|
; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
|
|
; GFX9: [[DS_READ_B128_gfx9_:%[0-9]+]]:vreg_128 = DS_READ_B128_gfx9 [[COPY]], 4000, 0, implicit $exec :: (load 16, align 8, addrspace 3)
|
|
; GFX9: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[DS_READ_B128_gfx9_]]
|
|
%0:vgpr(p3) = COPY $vgpr0
|
|
%1:vgpr(s32) = G_CONSTANT i32 4000
|
|
%2:vgpr(p3) = G_PTR_ADD %0, %1
|
|
%3:vgpr(<4 x s32>) = G_LOAD %2 :: (load 16, align 8, addrspace 3)
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %3
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: load_local_v2s64
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
|
|
; GFX7-LABEL: name: load_local_v2s64
|
|
; GFX7: liveins: $vgpr0
|
|
; GFX7: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
|
|
; GFX7: $m0 = S_MOV_B32 -1
|
|
; GFX7: [[DS_READ2_B64_:%[0-9]+]]:vreg_128 = DS_READ2_B64 [[COPY]], 0, 1, 0, implicit $m0, implicit $exec :: (load 16, align 8, addrspace 3)
|
|
; GFX7: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[DS_READ2_B64_]]
|
|
; GFX9-LABEL: name: load_local_v2s64
|
|
; GFX9: liveins: $vgpr0
|
|
; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
|
|
; GFX9: [[DS_READ_B128_gfx9_:%[0-9]+]]:vreg_128 = DS_READ_B128_gfx9 [[COPY]], 0, 0, implicit $exec :: (load 16, align 8, addrspace 3)
|
|
; GFX9: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[DS_READ_B128_gfx9_]]
|
|
%0:vgpr(p3) = COPY $vgpr0
|
|
%1:vgpr(<2 x s64>) = G_LOAD %0 :: (load 16, align 8, addrspace 3)
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %1
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: load_local_v2p1
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
|
|
; GFX7-LABEL: name: load_local_v2p1
|
|
; GFX7: liveins: $vgpr0
|
|
; GFX7: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
|
|
; GFX7: $m0 = S_MOV_B32 -1
|
|
; GFX7: [[LOAD:%[0-9]+]]:vreg_128(<2 x p1>) = G_LOAD [[COPY]](p3) :: (load 16, align 8, addrspace 3)
|
|
; GFX7: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[LOAD]](<2 x p1>)
|
|
; GFX9-LABEL: name: load_local_v2p1
|
|
; GFX9: liveins: $vgpr0
|
|
; GFX9: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
|
|
; GFX9: [[LOAD:%[0-9]+]]:vreg_128(<2 x p1>) = G_LOAD [[COPY]](p3) :: (load 16, align 8, addrspace 3)
|
|
; GFX9: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[LOAD]](<2 x p1>)
|
|
%0:vgpr(p3) = COPY $vgpr0
|
|
%1:vgpr(<2 x p1>) = G_LOAD %0 :: (load 16, align 8, addrspace 3)
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %1
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: load_local_s128
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
|
|
; GFX7-LABEL: name: load_local_s128
|
|
; GFX7: liveins: $vgpr0
|
|
; GFX7: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
|
|
; GFX7: $m0 = S_MOV_B32 -1
|
|
; GFX7: [[DS_READ2_B64_:%[0-9]+]]:vreg_128 = DS_READ2_B64 [[COPY]], 0, 1, 0, implicit $m0, implicit $exec :: (load 16, align 8, addrspace 3)
|
|
; GFX7: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[DS_READ2_B64_]]
|
|
; GFX9-LABEL: name: load_local_s128
|
|
; GFX9: liveins: $vgpr0
|
|
; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
|
|
; GFX9: [[DS_READ_B128_gfx9_:%[0-9]+]]:vreg_128 = DS_READ_B128_gfx9 [[COPY]], 0, 0, implicit $exec :: (load 16, align 8, addrspace 3)
|
|
; GFX9: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[DS_READ_B128_gfx9_]]
|
|
%0:vgpr(p3) = COPY $vgpr0
|
|
%1:vgpr(s128) = G_LOAD %0 :: (load 16, align 8, addrspace 3)
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %1
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: load_local_v8s16
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
|
|
; GFX7-LABEL: name: load_local_v8s16
|
|
; GFX7: liveins: $vgpr0
|
|
; GFX7: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
|
|
; GFX7: $m0 = S_MOV_B32 -1
|
|
; GFX7: [[LOAD:%[0-9]+]]:vreg_128(<8 x s16>) = G_LOAD [[COPY]](p3) :: (load 16, align 8, addrspace 3)
|
|
; GFX7: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[LOAD]](<8 x s16>)
|
|
; GFX9-LABEL: name: load_local_v8s16
|
|
; GFX9: liveins: $vgpr0
|
|
; GFX9: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
|
|
; GFX9: [[LOAD:%[0-9]+]]:vreg_128(<8 x s16>) = G_LOAD [[COPY]](p3) :: (load 16, align 8, addrspace 3)
|
|
; GFX9: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[LOAD]](<8 x s16>)
|
|
%0:vgpr(p3) = COPY $vgpr0
|
|
%1:vgpr(<8 x s16>) = G_LOAD %0 :: (load 16, align 8, addrspace 3)
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %1
|
|
|
|
...
|