mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
AMDGPU/GlobalISel: Add load legalization tests
This commit is contained in:
parent
c8eead66c5
commit
88f96ba9ed
@ -0,0 +1,168 @@
|
||||
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
||||
# RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=bonaire -O0 -run-pass=legalizer %s -o - | FileCheck -check-prefix=CI %s
|
||||
|
||||
---
|
||||
name: test_sextload_constant32bit_s64_s32_align4
|
||||
body: |
|
||||
bb.0:
|
||||
liveins: $sgpr0
|
||||
|
||||
; CI-LABEL: name: test_sextload_constant32bit_s64_s32_align4
|
||||
; CI: [[COPY:%[0-9]+]]:_(p6) = COPY $sgpr0
|
||||
; CI: [[C:%[0-9]+]]:_(p6) = G_CONSTANT i32 0
|
||||
; CI: [[MV:%[0-9]+]]:_(p4) = G_MERGE_VALUES [[COPY]](p6), [[C]](p6)
|
||||
; CI: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[MV]](p4) :: (load 4, addrspace 6)
|
||||
; CI: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[LOAD]](s32)
|
||||
; CI: $vgpr0_vgpr1 = COPY [[SEXT]](s64)
|
||||
%0:_(p6) = COPY $sgpr0
|
||||
%1:_(s64) = G_SEXTLOAD %0 :: (load 4, align 4, addrspace 6)
|
||||
$vgpr0_vgpr1 = COPY %1
|
||||
...
|
||||
|
||||
---
|
||||
name: test_sextload_constant32bit_s64_s32_align2
|
||||
body: |
|
||||
bb.0:
|
||||
liveins: $sgpr0
|
||||
|
||||
; CI-LABEL: name: test_sextload_constant32bit_s64_s32_align2
|
||||
; CI: [[COPY:%[0-9]+]]:_(p6) = COPY $sgpr0
|
||||
; CI: [[C:%[0-9]+]]:_(p6) = G_CONSTANT i32 0
|
||||
; CI: [[MV:%[0-9]+]]:_(p4) = G_MERGE_VALUES [[COPY]](p6), [[C]](p6)
|
||||
; CI: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[MV]](p4) :: (load 2, addrspace 6)
|
||||
; CI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
|
||||
; CI: [[PTR_ADD:%[0-9]+]]:_(p4) = G_PTR_ADD [[MV]], [[C1]](s64)
|
||||
; CI: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p4) :: (load 2, addrspace 6)
|
||||
; CI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
|
||||
; CI: [[COPY1:%[0-9]+]]:_(s32) = COPY [[LOAD]](s32)
|
||||
; CI: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C2]]
|
||||
; CI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[LOAD1]](s32)
|
||||
; CI: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C2]]
|
||||
; CI: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
|
||||
; CI: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C3]](s32)
|
||||
; CI: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
|
||||
; CI: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[OR]](s32)
|
||||
; CI: $vgpr0_vgpr1 = COPY [[SEXT]](s64)
|
||||
%0:_(p6) = COPY $sgpr0
|
||||
%1:_(s64) = G_SEXTLOAD %0 :: (load 4, align 2, addrspace 6)
|
||||
$vgpr0_vgpr1 = COPY %1
|
||||
...
|
||||
|
||||
---
|
||||
name: test_sextload_constant32bit_s64_s32_align1
|
||||
body: |
|
||||
bb.0:
|
||||
liveins: $sgpr0
|
||||
|
||||
; CI-LABEL: name: test_sextload_constant32bit_s64_s32_align1
|
||||
; CI: [[COPY:%[0-9]+]]:_(p6) = COPY $sgpr0
|
||||
; CI: [[C:%[0-9]+]]:_(p6) = G_CONSTANT i32 0
|
||||
; CI: [[MV:%[0-9]+]]:_(p4) = G_MERGE_VALUES [[COPY]](p6), [[C]](p6)
|
||||
; CI: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[MV]](p4) :: (load 1, addrspace 6)
|
||||
; CI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
|
||||
; CI: [[PTR_ADD:%[0-9]+]]:_(p4) = G_PTR_ADD [[MV]], [[C1]](s64)
|
||||
; CI: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p4) :: (load 1, addrspace 6)
|
||||
; CI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
|
||||
; CI: [[PTR_ADD1:%[0-9]+]]:_(p4) = G_PTR_ADD [[MV]], [[C2]](s64)
|
||||
; CI: [[LOAD2:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD1]](p4) :: (load 1, addrspace 6)
|
||||
; CI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
|
||||
; CI: [[PTR_ADD2:%[0-9]+]]:_(p4) = G_PTR_ADD [[MV]], [[C3]](s64)
|
||||
; CI: [[LOAD3:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD2]](p4) :: (load 1, addrspace 6)
|
||||
; CI: [[C4:%[0-9]+]]:_(s16) = G_CONSTANT i16 255
|
||||
; CI: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[LOAD]](s32)
|
||||
; CI: [[AND:%[0-9]+]]:_(s16) = G_AND [[TRUNC]], [[C4]]
|
||||
; CI: [[C5:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
|
||||
; CI: [[COPY1:%[0-9]+]]:_(s32) = COPY [[C5]](s32)
|
||||
; CI: [[C6:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
|
||||
; CI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[LOAD1]](s32)
|
||||
; CI: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C6]]
|
||||
; CI: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[COPY1]](s32)
|
||||
; CI: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[SHL]](s32)
|
||||
; CI: [[OR:%[0-9]+]]:_(s16) = G_OR [[AND]], [[TRUNC1]]
|
||||
; CI: [[TRUNC2:%[0-9]+]]:_(s16) = G_TRUNC [[LOAD2]](s32)
|
||||
; CI: [[AND2:%[0-9]+]]:_(s16) = G_AND [[TRUNC2]], [[C4]]
|
||||
; CI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LOAD3]](s32)
|
||||
; CI: [[AND3:%[0-9]+]]:_(s32) = G_AND [[COPY3]], [[C6]]
|
||||
; CI: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[AND3]], [[C5]](s32)
|
||||
; CI: [[TRUNC3:%[0-9]+]]:_(s16) = G_TRUNC [[SHL1]](s32)
|
||||
; CI: [[OR1:%[0-9]+]]:_(s16) = G_OR [[AND2]], [[TRUNC3]]
|
||||
; CI: [[ZEXT:%[0-9]+]]:_(s32) = G_ZEXT [[OR]](s16)
|
||||
; CI: [[ZEXT1:%[0-9]+]]:_(s32) = G_ZEXT [[OR1]](s16)
|
||||
; CI: [[C7:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
|
||||
; CI: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[ZEXT1]], [[C7]](s32)
|
||||
; CI: [[OR2:%[0-9]+]]:_(s32) = G_OR [[ZEXT]], [[SHL2]]
|
||||
; CI: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[OR2]](s32)
|
||||
; CI: $vgpr0_vgpr1 = COPY [[SEXT]](s64)
|
||||
%0:_(p6) = COPY $sgpr0
|
||||
%1:_(s64) = G_SEXTLOAD %0 :: (load 4, align 1, addrspace 6)
|
||||
$vgpr0_vgpr1 = COPY %1
|
||||
...
|
||||
|
||||
---
|
||||
name: test_sextload_constant32bit_s32_s8_align1
|
||||
body: |
|
||||
bb.0:
|
||||
liveins: $sgpr0
|
||||
|
||||
; CI-LABEL: name: test_sextload_constant32bit_s32_s8_align1
|
||||
; CI: [[COPY:%[0-9]+]]:_(p6) = COPY $sgpr0
|
||||
; CI: [[C:%[0-9]+]]:_(p6) = G_CONSTANT i32 0
|
||||
; CI: [[MV:%[0-9]+]]:_(p4) = G_MERGE_VALUES [[COPY]](p6), [[C]](p6)
|
||||
; CI: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[MV]](p4) :: (load 1, addrspace 6)
|
||||
; CI: [[COPY1:%[0-9]+]]:_(s32) = COPY [[LOAD]](s32)
|
||||
; CI: [[SEXT_INREG:%[0-9]+]]:_(s32) = G_SEXT_INREG [[COPY1]], 8
|
||||
; CI: $vgpr0 = COPY [[SEXT_INREG]](s32)
|
||||
%0:_(p6) = COPY $sgpr0
|
||||
%1:_(s32) = G_SEXTLOAD %0 :: (load 1, align 1, addrspace 6)
|
||||
$vgpr0 = COPY %1
|
||||
...
|
||||
|
||||
---
|
||||
name: test_sextload_constant32bit_s32_s16_align2
|
||||
body: |
|
||||
bb.0:
|
||||
liveins: $sgpr0
|
||||
|
||||
; CI-LABEL: name: test_sextload_constant32bit_s32_s16_align2
|
||||
; CI: [[COPY:%[0-9]+]]:_(p6) = COPY $sgpr0
|
||||
; CI: [[C:%[0-9]+]]:_(p6) = G_CONSTANT i32 0
|
||||
; CI: [[MV:%[0-9]+]]:_(p4) = G_MERGE_VALUES [[COPY]](p6), [[C]](p6)
|
||||
; CI: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[MV]](p4) :: (load 2, addrspace 6)
|
||||
; CI: [[COPY1:%[0-9]+]]:_(s32) = COPY [[LOAD]](s32)
|
||||
; CI: [[SEXT_INREG:%[0-9]+]]:_(s32) = G_SEXT_INREG [[COPY1]], 16
|
||||
; CI: $vgpr0 = COPY [[SEXT_INREG]](s32)
|
||||
%0:_(p6) = COPY $sgpr0
|
||||
%1:_(s32) = G_SEXTLOAD %0 :: (load 2, align 2, addrspace 6)
|
||||
$vgpr0 = COPY %1
|
||||
...
|
||||
|
||||
---
|
||||
name: test_sextload_constant32bit_s32_s16_align1
|
||||
body: |
|
||||
bb.0:
|
||||
liveins: $sgpr0
|
||||
|
||||
; CI-LABEL: name: test_sextload_constant32bit_s32_s16_align1
|
||||
; CI: [[COPY:%[0-9]+]]:_(p6) = COPY $sgpr0
|
||||
; CI: [[C:%[0-9]+]]:_(p6) = G_CONSTANT i32 0
|
||||
; CI: [[MV:%[0-9]+]]:_(p4) = G_MERGE_VALUES [[COPY]](p6), [[C]](p6)
|
||||
; CI: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[MV]](p4) :: (load 1, addrspace 6)
|
||||
; CI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
|
||||
; CI: [[PTR_ADD:%[0-9]+]]:_(p4) = G_PTR_ADD [[MV]], [[C1]](s64)
|
||||
; CI: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p4) :: (load 1, addrspace 6)
|
||||
; CI: [[C2:%[0-9]+]]:_(s16) = G_CONSTANT i16 255
|
||||
; CI: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[LOAD]](s32)
|
||||
; CI: [[AND:%[0-9]+]]:_(s16) = G_AND [[TRUNC]], [[C2]]
|
||||
; CI: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
|
||||
; CI: [[C4:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
|
||||
; CI: [[COPY1:%[0-9]+]]:_(s32) = COPY [[LOAD1]](s32)
|
||||
; CI: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C4]]
|
||||
; CI: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C3]](s32)
|
||||
; CI: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[SHL]](s32)
|
||||
; CI: [[OR:%[0-9]+]]:_(s16) = G_OR [[AND]], [[TRUNC1]]
|
||||
; CI: [[SEXT:%[0-9]+]]:_(s32) = G_SEXT [[OR]](s16)
|
||||
; CI: $vgpr0 = COPY [[SEXT]](s32)
|
||||
%0:_(p6) = COPY $sgpr0
|
||||
%1:_(s32) = G_SEXTLOAD %0 :: (load 2, align 1, addrspace 6)
|
||||
$vgpr0 = COPY %1
|
||||
...
|
@ -0,0 +1,170 @@
|
||||
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
||||
# RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=bonaire -O0 -run-pass=legalizer %s -o - | FileCheck -check-prefix=CI %s
|
||||
|
||||
---
|
||||
name: test_zextload_constant32bit_s64_s32_align4
|
||||
body: |
|
||||
bb.0:
|
||||
liveins: $sgpr0
|
||||
|
||||
; CI-LABEL: name: test_zextload_constant32bit_s64_s32_align4
|
||||
; CI: [[COPY:%[0-9]+]]:_(p6) = COPY $sgpr0
|
||||
; CI: [[C:%[0-9]+]]:_(p6) = G_CONSTANT i32 0
|
||||
; CI: [[MV:%[0-9]+]]:_(p4) = G_MERGE_VALUES [[COPY]](p6), [[C]](p6)
|
||||
; CI: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[MV]](p4) :: (load 4, addrspace 6)
|
||||
; CI: [[ZEXT:%[0-9]+]]:_(s64) = G_ZEXT [[LOAD]](s32)
|
||||
; CI: $vgpr0_vgpr1 = COPY [[ZEXT]](s64)
|
||||
%0:_(p6) = COPY $sgpr0
|
||||
%1:_(s64) = G_ZEXTLOAD %0 :: (load 4, align 4, addrspace 6)
|
||||
$vgpr0_vgpr1 = COPY %1
|
||||
...
|
||||
|
||||
---
|
||||
name: test_zextload_constant32bit_s64_s32_align2
|
||||
body: |
|
||||
bb.0:
|
||||
liveins: $sgpr0
|
||||
|
||||
; CI-LABEL: name: test_zextload_constant32bit_s64_s32_align2
|
||||
; CI: [[COPY:%[0-9]+]]:_(p6) = COPY $sgpr0
|
||||
; CI: [[C:%[0-9]+]]:_(p6) = G_CONSTANT i32 0
|
||||
; CI: [[MV:%[0-9]+]]:_(p4) = G_MERGE_VALUES [[COPY]](p6), [[C]](p6)
|
||||
; CI: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[MV]](p4) :: (load 2, addrspace 6)
|
||||
; CI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
|
||||
; CI: [[PTR_ADD:%[0-9]+]]:_(p4) = G_PTR_ADD [[MV]], [[C1]](s64)
|
||||
; CI: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p4) :: (load 2, addrspace 6)
|
||||
; CI: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
|
||||
; CI: [[COPY1:%[0-9]+]]:_(s32) = COPY [[LOAD]](s32)
|
||||
; CI: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C2]]
|
||||
; CI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[LOAD1]](s32)
|
||||
; CI: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C2]]
|
||||
; CI: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
|
||||
; CI: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C3]](s32)
|
||||
; CI: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
|
||||
; CI: [[ZEXT:%[0-9]+]]:_(s64) = G_ZEXT [[OR]](s32)
|
||||
; CI: $vgpr0_vgpr1 = COPY [[ZEXT]](s64)
|
||||
%0:_(p6) = COPY $sgpr0
|
||||
%1:_(s64) = G_ZEXTLOAD %0 :: (load 4, align 2, addrspace 6)
|
||||
$vgpr0_vgpr1 = COPY %1
|
||||
...
|
||||
|
||||
---
|
||||
name: test_zextload_constant32bit_s64_s32_align1
|
||||
body: |
|
||||
bb.0:
|
||||
liveins: $sgpr0
|
||||
|
||||
; CI-LABEL: name: test_zextload_constant32bit_s64_s32_align1
|
||||
; CI: [[COPY:%[0-9]+]]:_(p6) = COPY $sgpr0
|
||||
; CI: [[C:%[0-9]+]]:_(p6) = G_CONSTANT i32 0
|
||||
; CI: [[MV:%[0-9]+]]:_(p4) = G_MERGE_VALUES [[COPY]](p6), [[C]](p6)
|
||||
; CI: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[MV]](p4) :: (load 1, addrspace 6)
|
||||
; CI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
|
||||
; CI: [[PTR_ADD:%[0-9]+]]:_(p4) = G_PTR_ADD [[MV]], [[C1]](s64)
|
||||
; CI: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p4) :: (load 1, addrspace 6)
|
||||
; CI: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
|
||||
; CI: [[PTR_ADD1:%[0-9]+]]:_(p4) = G_PTR_ADD [[MV]], [[C2]](s64)
|
||||
; CI: [[LOAD2:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD1]](p4) :: (load 1, addrspace 6)
|
||||
; CI: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
|
||||
; CI: [[PTR_ADD2:%[0-9]+]]:_(p4) = G_PTR_ADD [[MV]], [[C3]](s64)
|
||||
; CI: [[LOAD3:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD2]](p4) :: (load 1, addrspace 6)
|
||||
; CI: [[C4:%[0-9]+]]:_(s16) = G_CONSTANT i16 255
|
||||
; CI: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[LOAD]](s32)
|
||||
; CI: [[AND:%[0-9]+]]:_(s16) = G_AND [[TRUNC]], [[C4]]
|
||||
; CI: [[C5:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
|
||||
; CI: [[COPY1:%[0-9]+]]:_(s32) = COPY [[C5]](s32)
|
||||
; CI: [[C6:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
|
||||
; CI: [[COPY2:%[0-9]+]]:_(s32) = COPY [[LOAD1]](s32)
|
||||
; CI: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C6]]
|
||||
; CI: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[COPY1]](s32)
|
||||
; CI: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[SHL]](s32)
|
||||
; CI: [[OR:%[0-9]+]]:_(s16) = G_OR [[AND]], [[TRUNC1]]
|
||||
; CI: [[TRUNC2:%[0-9]+]]:_(s16) = G_TRUNC [[LOAD2]](s32)
|
||||
; CI: [[AND2:%[0-9]+]]:_(s16) = G_AND [[TRUNC2]], [[C4]]
|
||||
; CI: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LOAD3]](s32)
|
||||
; CI: [[AND3:%[0-9]+]]:_(s32) = G_AND [[COPY3]], [[C6]]
|
||||
; CI: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[AND3]], [[C5]](s32)
|
||||
; CI: [[TRUNC3:%[0-9]+]]:_(s16) = G_TRUNC [[SHL1]](s32)
|
||||
; CI: [[OR1:%[0-9]+]]:_(s16) = G_OR [[AND2]], [[TRUNC3]]
|
||||
; CI: [[ZEXT:%[0-9]+]]:_(s32) = G_ZEXT [[OR]](s16)
|
||||
; CI: [[ZEXT1:%[0-9]+]]:_(s32) = G_ZEXT [[OR1]](s16)
|
||||
; CI: [[C7:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
|
||||
; CI: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[ZEXT1]], [[C7]](s32)
|
||||
; CI: [[OR2:%[0-9]+]]:_(s32) = G_OR [[ZEXT]], [[SHL2]]
|
||||
; CI: [[ZEXT2:%[0-9]+]]:_(s64) = G_ZEXT [[OR2]](s32)
|
||||
; CI: $vgpr0_vgpr1 = COPY [[ZEXT2]](s64)
|
||||
%0:_(p6) = COPY $sgpr0
|
||||
%1:_(s64) = G_ZEXTLOAD %0 :: (load 4, align 1, addrspace 6)
|
||||
$vgpr0_vgpr1 = COPY %1
|
||||
...
|
||||
|
||||
---
|
||||
name: test_zextload_constant32bit_s32_s8_align1
|
||||
body: |
|
||||
bb.0:
|
||||
liveins: $sgpr0
|
||||
|
||||
; CI-LABEL: name: test_zextload_constant32bit_s32_s8_align1
|
||||
; CI: [[COPY:%[0-9]+]]:_(p6) = COPY $sgpr0
|
||||
; CI: [[C:%[0-9]+]]:_(p6) = G_CONSTANT i32 0
|
||||
; CI: [[MV:%[0-9]+]]:_(p4) = G_MERGE_VALUES [[COPY]](p6), [[C]](p6)
|
||||
; CI: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[MV]](p4) :: (load 1, addrspace 6)
|
||||
; CI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
|
||||
; CI: [[COPY1:%[0-9]+]]:_(s32) = COPY [[LOAD]](s32)
|
||||
; CI: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
|
||||
; CI: $vgpr0 = COPY [[AND]](s32)
|
||||
%0:_(p6) = COPY $sgpr0
|
||||
%1:_(s32) = G_ZEXTLOAD %0 :: (load 1, align 1, addrspace 6)
|
||||
$vgpr0 = COPY %1
|
||||
...
|
||||
|
||||
---
|
||||
name: test_zextload_constant32bit_s32_s16_align2
|
||||
body: |
|
||||
bb.0:
|
||||
liveins: $sgpr0
|
||||
|
||||
; CI-LABEL: name: test_zextload_constant32bit_s32_s16_align2
|
||||
; CI: [[COPY:%[0-9]+]]:_(p6) = COPY $sgpr0
|
||||
; CI: [[C:%[0-9]+]]:_(p6) = G_CONSTANT i32 0
|
||||
; CI: [[MV:%[0-9]+]]:_(p4) = G_MERGE_VALUES [[COPY]](p6), [[C]](p6)
|
||||
; CI: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[MV]](p4) :: (load 2, addrspace 6)
|
||||
; CI: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
|
||||
; CI: [[COPY1:%[0-9]+]]:_(s32) = COPY [[LOAD]](s32)
|
||||
; CI: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
|
||||
; CI: $vgpr0 = COPY [[AND]](s32)
|
||||
%0:_(p6) = COPY $sgpr0
|
||||
%1:_(s32) = G_ZEXTLOAD %0 :: (load 2, align 2, addrspace 6)
|
||||
$vgpr0 = COPY %1
|
||||
...
|
||||
|
||||
---
|
||||
name: test_zextload_constant32bit_s32_s16_align1
|
||||
body: |
|
||||
bb.0:
|
||||
liveins: $sgpr0
|
||||
|
||||
; CI-LABEL: name: test_zextload_constant32bit_s32_s16_align1
|
||||
; CI: [[COPY:%[0-9]+]]:_(p6) = COPY $sgpr0
|
||||
; CI: [[C:%[0-9]+]]:_(p6) = G_CONSTANT i32 0
|
||||
; CI: [[MV:%[0-9]+]]:_(p4) = G_MERGE_VALUES [[COPY]](p6), [[C]](p6)
|
||||
; CI: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[MV]](p4) :: (load 1, addrspace 6)
|
||||
; CI: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
|
||||
; CI: [[PTR_ADD:%[0-9]+]]:_(p4) = G_PTR_ADD [[MV]], [[C1]](s64)
|
||||
; CI: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p4) :: (load 1, addrspace 6)
|
||||
; CI: [[C2:%[0-9]+]]:_(s16) = G_CONSTANT i16 255
|
||||
; CI: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[LOAD]](s32)
|
||||
; CI: [[AND:%[0-9]+]]:_(s16) = G_AND [[TRUNC]], [[C2]]
|
||||
; CI: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
|
||||
; CI: [[C4:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
|
||||
; CI: [[COPY1:%[0-9]+]]:_(s32) = COPY [[LOAD1]](s32)
|
||||
; CI: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C4]]
|
||||
; CI: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C3]](s32)
|
||||
; CI: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[SHL]](s32)
|
||||
; CI: [[OR:%[0-9]+]]:_(s16) = G_OR [[AND]], [[TRUNC1]]
|
||||
; CI: [[ZEXT:%[0-9]+]]:_(s32) = G_ZEXT [[OR]](s16)
|
||||
; CI: $vgpr0 = COPY [[ZEXT]](s32)
|
||||
%0:_(p6) = COPY $sgpr0
|
||||
%1:_(s32) = G_ZEXTLOAD %0 :: (load 2, align 1, addrspace 6)
|
||||
$vgpr0 = COPY %1
|
||||
...
|
Loading…
Reference in New Issue
Block a user