llvm-for-llvmta/test/CodeGen/AMDGPU/GlobalISel/legalize-sextload-local.mir

93 lines
3.0 KiB
Plaintext
Raw Permalink Normal View History

2022-04-25 10:02:23 +02:00
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -run-pass=legalizer -o - %s | FileCheck %s
# RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=tahiti -run-pass=legalizer -o - %s | FileCheck %s
---
name: test_sextload_local_i32_i8
body: |
bb.0:
liveins: $vgpr0
; CHECK-LABEL: name: test_sextload_local_i32_i8
; CHECK: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0
; CHECK: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p3) :: (load 1, addrspace 3)
; CHECK: $vgpr0 = COPY [[SEXTLOAD]](s32)
%0:_(p3) = COPY $vgpr0
%1:_(s32) = G_SEXTLOAD %0 :: (load 1, addrspace 3)
$vgpr0 = COPY %1
...
---
name: test_sextload_local_i32_i16
body: |
bb.0:
liveins: $vgpr0
; CHECK-LABEL: name: test_sextload_local_i32_i16
; CHECK: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0
; CHECK: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p3) :: (load 2, addrspace 3)
; CHECK: $vgpr0 = COPY [[SEXTLOAD]](s32)
%0:_(p3) = COPY $vgpr0
%1:_(s32) = G_SEXTLOAD %0 :: (load 2, addrspace 3)
$vgpr0 = COPY %1
...
---
name: test_sextload_local_i31_i8
body: |
bb.0:
liveins: $vgpr0
; CHECK-LABEL: name: test_sextload_local_i31_i8
; CHECK: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0
; CHECK: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p3) :: (load 1, addrspace 3)
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[SEXTLOAD]](s32)
; CHECK: $vgpr0 = COPY [[COPY1]](s32)
%0:_(p3) = COPY $vgpr0
%1:_(s31) = G_SEXTLOAD %0 :: (load 1, addrspace 3)
%2:_(s32) = G_ANYEXT %1
$vgpr0 = COPY %2
...
---
name: test_sextload_local_i64_i8
body: |
bb.0:
liveins: $vgpr0
; CHECK-LABEL: name: test_sextload_local_i64_i8
; CHECK: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0
; CHECK: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p3) :: (load 1, addrspace 3)
; CHECK: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[SEXTLOAD]](s32)
; CHECK: $vgpr0_vgpr1 = COPY [[SEXT]](s64)
%0:_(p3) = COPY $vgpr0
%1:_(s64) = G_SEXTLOAD %0 :: (load 1, addrspace 3)
$vgpr0_vgpr1 = COPY %1
...
---
name: test_sextload_local_i64_i16
body: |
bb.0:
liveins: $vgpr0
; CHECK-LABEL: name: test_sextload_local_i64_i16
; CHECK: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0
; CHECK: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p3) :: (load 2, addrspace 3)
; CHECK: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[SEXTLOAD]](s32)
; CHECK: $vgpr0_vgpr1 = COPY [[SEXT]](s64)
%0:_(p3) = COPY $vgpr0
%1:_(s64) = G_SEXTLOAD %0 :: (load 2, addrspace 3)
$vgpr0_vgpr1 = COPY %1
...
---
name: test_sextload_local_i64_i32
body: |
bb.0:
liveins: $vgpr0_vgpr1
; CHECK-LABEL: name: test_sextload_local_i64_i32
; CHECK: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0
; CHECK: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load 4, addrspace 3)
; CHECK: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[LOAD]](s32)
; CHECK: $vgpr0_vgpr1 = COPY [[SEXT]](s64)
%0:_(p3) = COPY $vgpr0
%1:_(s64) = G_SEXTLOAD %0 :: (load 4, addrspace 3)
$vgpr0_vgpr1 = COPY %1
...