| # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py |
| # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=tahiti -O0 -run-pass=legalizer -global-isel-abort=0 %s -o - | FileCheck -check-prefix=SI %s |
| # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=bonaire -mattr=-enable-ds128 -O0 -run-pass=legalizer -global-isel-abort=0 %s -o - | FileCheck -check-prefix=CI %s |
| # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=bonaire -mattr=+enable-ds128 -O0 -run-pass=legalizer -global-isel-abort=0 %s -o - | FileCheck -check-prefix=CI-DS128 %s |
| # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -O0 -run-pass=legalizer -global-isel-abort=0 %s -o - | FileCheck -check-prefix=VI %s |
| # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -O0 -run-pass=legalizer -mattr=-unaligned-access-mode -global-isel-abort=0 %s -o - | FileCheck -check-prefix=GFX9 %s |
| # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -O0 -run-pass=legalizer -mattr=+unaligned-access-mode -global-isel-abort=0 %s -o - | FileCheck -check-prefix=GFX9-UNALIGNED %s |
| # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1010 -O0 -run-pass=legalizer -mattr=-unaligned-access-mode -global-isel-abort=0 %s -o - | FileCheck -check-prefix=GFX10 %s |
| # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1010 -O0 -run-pass=legalizer -mattr=+unaligned-access-mode -global-isel-abort=0 %s -o - | FileCheck -check-prefix=GFX10-UNALIGNED %s |
| # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1100 -O0 -run-pass=legalizer -mattr=-unaligned-access-mode -global-isel-abort=0 %s -o - | FileCheck -check-prefix=GFX11 %s |
| # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1100 -O0 -run-pass=legalizer -mattr=+unaligned-access-mode -global-isel-abort=0 %s -o - | FileCheck -check-prefix=GFX11-UNALIGNED %s |
| |
| --- |
| name: test_load_local_s1_align1 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_local_s1_align1 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; SI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; SI-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[LOAD]], [[C]] |
| ; SI-NEXT: $vgpr0 = COPY [[AND]](s32) |
| ; |
| ; CI-LABEL: name: test_load_local_s1_align1 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; CI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; CI-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[LOAD]], [[C]] |
| ; CI-NEXT: $vgpr0 = COPY [[AND]](s32) |
| ; |
| ; CI-DS128-LABEL: name: test_load_local_s1_align1 |
| ; CI-DS128: liveins: $vgpr0 |
| ; CI-DS128-NEXT: {{ $}} |
| ; CI-DS128-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; CI-DS128-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; CI-DS128-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; CI-DS128-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[LOAD]], [[C]] |
| ; CI-DS128-NEXT: $vgpr0 = COPY [[AND]](s32) |
| ; |
| ; VI-LABEL: name: test_load_local_s1_align1 |
| ; VI: liveins: $vgpr0 |
| ; VI-NEXT: {{ $}} |
| ; VI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; VI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; VI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; VI-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[LOAD]], [[C]] |
| ; VI-NEXT: $vgpr0 = COPY [[AND]](s32) |
| ; |
| ; GFX9-LABEL: name: test_load_local_s1_align1 |
| ; GFX9: liveins: $vgpr0 |
| ; GFX9-NEXT: {{ $}} |
| ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX9-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; GFX9-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; GFX9-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[LOAD]], [[C]] |
| ; GFX9-NEXT: $vgpr0 = COPY [[AND]](s32) |
| ; |
| ; GFX9-UNALIGNED-LABEL: name: test_load_local_s1_align1 |
| ; GFX9-UNALIGNED: liveins: $vgpr0 |
| ; GFX9-UNALIGNED-NEXT: {{ $}} |
| ; GFX9-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX9-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; GFX9-UNALIGNED-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; GFX9-UNALIGNED-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[LOAD]], [[C]] |
| ; GFX9-UNALIGNED-NEXT: $vgpr0 = COPY [[AND]](s32) |
| ; |
| ; GFX10-LABEL: name: test_load_local_s1_align1 |
| ; GFX10: liveins: $vgpr0 |
| ; GFX10-NEXT: {{ $}} |
| ; GFX10-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX10-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; GFX10-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; GFX10-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[LOAD]], [[C]] |
| ; GFX10-NEXT: $vgpr0 = COPY [[AND]](s32) |
| ; |
| ; GFX10-UNALIGNED-LABEL: name: test_load_local_s1_align1 |
| ; GFX10-UNALIGNED: liveins: $vgpr0 |
| ; GFX10-UNALIGNED-NEXT: {{ $}} |
| ; GFX10-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX10-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; GFX10-UNALIGNED-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; GFX10-UNALIGNED-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[LOAD]], [[C]] |
| ; GFX10-UNALIGNED-NEXT: $vgpr0 = COPY [[AND]](s32) |
| ; |
| ; GFX11-LABEL: name: test_load_local_s1_align1 |
| ; GFX11: liveins: $vgpr0 |
| ; GFX11-NEXT: {{ $}} |
| ; GFX11-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX11-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; GFX11-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; GFX11-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[LOAD]], [[C]] |
| ; GFX11-NEXT: $vgpr0 = COPY [[AND]](s32) |
| ; |
| ; GFX11-UNALIGNED-LABEL: name: test_load_local_s1_align1 |
| ; GFX11-UNALIGNED: liveins: $vgpr0 |
| ; GFX11-UNALIGNED-NEXT: {{ $}} |
| ; GFX11-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX11-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; GFX11-UNALIGNED-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; GFX11-UNALIGNED-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[LOAD]], [[C]] |
| ; GFX11-UNALIGNED-NEXT: $vgpr0 = COPY [[AND]](s32) |
| %0:_(p3) = COPY $vgpr0 |
| %1:_(s1) = G_LOAD %0 :: (load (s1), align 1, addrspace 3) |
| %2:_(s32) = G_ZEXT %1 |
| $vgpr0 = COPY %2 |
| ... |
| |
| --- |
| name: test_load_local_s2_align1 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_local_s2_align1 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; SI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 3 |
| ; SI-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[LOAD]], [[C]] |
| ; SI-NEXT: $vgpr0 = COPY [[AND]](s32) |
| ; |
| ; CI-LABEL: name: test_load_local_s2_align1 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; CI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 3 |
| ; CI-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[LOAD]], [[C]] |
| ; CI-NEXT: $vgpr0 = COPY [[AND]](s32) |
| ; |
| ; CI-DS128-LABEL: name: test_load_local_s2_align1 |
| ; CI-DS128: liveins: $vgpr0 |
| ; CI-DS128-NEXT: {{ $}} |
| ; CI-DS128-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; CI-DS128-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; CI-DS128-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 3 |
| ; CI-DS128-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[LOAD]], [[C]] |
| ; CI-DS128-NEXT: $vgpr0 = COPY [[AND]](s32) |
| ; |
| ; VI-LABEL: name: test_load_local_s2_align1 |
| ; VI: liveins: $vgpr0 |
| ; VI-NEXT: {{ $}} |
| ; VI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; VI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; VI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 3 |
| ; VI-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[LOAD]], [[C]] |
| ; VI-NEXT: $vgpr0 = COPY [[AND]](s32) |
| ; |
| ; GFX9-LABEL: name: test_load_local_s2_align1 |
| ; GFX9: liveins: $vgpr0 |
| ; GFX9-NEXT: {{ $}} |
| ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX9-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; GFX9-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 3 |
| ; GFX9-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[LOAD]], [[C]] |
| ; GFX9-NEXT: $vgpr0 = COPY [[AND]](s32) |
| ; |
| ; GFX9-UNALIGNED-LABEL: name: test_load_local_s2_align1 |
| ; GFX9-UNALIGNED: liveins: $vgpr0 |
| ; GFX9-UNALIGNED-NEXT: {{ $}} |
| ; GFX9-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX9-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; GFX9-UNALIGNED-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 3 |
| ; GFX9-UNALIGNED-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[LOAD]], [[C]] |
| ; GFX9-UNALIGNED-NEXT: $vgpr0 = COPY [[AND]](s32) |
| ; |
| ; GFX10-LABEL: name: test_load_local_s2_align1 |
| ; GFX10: liveins: $vgpr0 |
| ; GFX10-NEXT: {{ $}} |
| ; GFX10-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX10-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; GFX10-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 3 |
| ; GFX10-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[LOAD]], [[C]] |
| ; GFX10-NEXT: $vgpr0 = COPY [[AND]](s32) |
| ; |
| ; GFX10-UNALIGNED-LABEL: name: test_load_local_s2_align1 |
| ; GFX10-UNALIGNED: liveins: $vgpr0 |
| ; GFX10-UNALIGNED-NEXT: {{ $}} |
| ; GFX10-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX10-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; GFX10-UNALIGNED-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 3 |
| ; GFX10-UNALIGNED-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[LOAD]], [[C]] |
| ; GFX10-UNALIGNED-NEXT: $vgpr0 = COPY [[AND]](s32) |
| ; |
| ; GFX11-LABEL: name: test_load_local_s2_align1 |
| ; GFX11: liveins: $vgpr0 |
| ; GFX11-NEXT: {{ $}} |
| ; GFX11-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX11-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; GFX11-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 3 |
| ; GFX11-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[LOAD]], [[C]] |
| ; GFX11-NEXT: $vgpr0 = COPY [[AND]](s32) |
| ; |
| ; GFX11-UNALIGNED-LABEL: name: test_load_local_s2_align1 |
| ; GFX11-UNALIGNED: liveins: $vgpr0 |
| ; GFX11-UNALIGNED-NEXT: {{ $}} |
| ; GFX11-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX11-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; GFX11-UNALIGNED-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 3 |
| ; GFX11-UNALIGNED-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[LOAD]], [[C]] |
| ; GFX11-UNALIGNED-NEXT: $vgpr0 = COPY [[AND]](s32) |
| %0:_(p3) = COPY $vgpr0 |
| %1:_(s2) = G_LOAD %0 :: (load (s2), align 1, addrspace 3) |
| %2:_(s32) = G_ZEXT %1 |
| $vgpr0 = COPY %2 |
| ... |
| |
| --- |
| name: test_load_local_s8_align4 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_local_s8_align4 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), align 4, addrspace 3) |
| ; SI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; CI-LABEL: name: test_load_local_s8_align4 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), align 4, addrspace 3) |
| ; CI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; CI-DS128-LABEL: name: test_load_local_s8_align4 |
| ; CI-DS128: liveins: $vgpr0 |
| ; CI-DS128-NEXT: {{ $}} |
| ; CI-DS128-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; CI-DS128-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), align 4, addrspace 3) |
| ; CI-DS128-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; VI-LABEL: name: test_load_local_s8_align4 |
| ; VI: liveins: $vgpr0 |
| ; VI-NEXT: {{ $}} |
| ; VI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; VI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), align 4, addrspace 3) |
| ; VI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX9-LABEL: name: test_load_local_s8_align4 |
| ; GFX9: liveins: $vgpr0 |
| ; GFX9-NEXT: {{ $}} |
| ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX9-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), align 4, addrspace 3) |
| ; GFX9-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX9-UNALIGNED-LABEL: name: test_load_local_s8_align4 |
| ; GFX9-UNALIGNED: liveins: $vgpr0 |
| ; GFX9-UNALIGNED-NEXT: {{ $}} |
| ; GFX9-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX9-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), align 4, addrspace 3) |
| ; GFX9-UNALIGNED-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX10-LABEL: name: test_load_local_s8_align4 |
| ; GFX10: liveins: $vgpr0 |
| ; GFX10-NEXT: {{ $}} |
| ; GFX10-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX10-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), align 4, addrspace 3) |
| ; GFX10-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX10-UNALIGNED-LABEL: name: test_load_local_s8_align4 |
| ; GFX10-UNALIGNED: liveins: $vgpr0 |
| ; GFX10-UNALIGNED-NEXT: {{ $}} |
| ; GFX10-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX10-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), align 4, addrspace 3) |
| ; GFX10-UNALIGNED-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX11-LABEL: name: test_load_local_s8_align4 |
| ; GFX11: liveins: $vgpr0 |
| ; GFX11-NEXT: {{ $}} |
| ; GFX11-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX11-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), align 4, addrspace 3) |
| ; GFX11-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX11-UNALIGNED-LABEL: name: test_load_local_s8_align4 |
| ; GFX11-UNALIGNED: liveins: $vgpr0 |
| ; GFX11-UNALIGNED-NEXT: {{ $}} |
| ; GFX11-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX11-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), align 4, addrspace 3) |
| ; GFX11-UNALIGNED-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| %0:_(p3) = COPY $vgpr0 |
| %1:_(s8) = G_LOAD %0 :: (load (s8), align 4, addrspace 3) |
| %2:_(s32) = G_ANYEXT %1 |
| $vgpr0 = COPY %2 |
| ... |
| |
| --- |
| name: test_load_local_s8_align1 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_local_s8_align1 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; SI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; CI-LABEL: name: test_load_local_s8_align1 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; CI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; CI-DS128-LABEL: name: test_load_local_s8_align1 |
| ; CI-DS128: liveins: $vgpr0 |
| ; CI-DS128-NEXT: {{ $}} |
| ; CI-DS128-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; CI-DS128-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; CI-DS128-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; VI-LABEL: name: test_load_local_s8_align1 |
| ; VI: liveins: $vgpr0 |
| ; VI-NEXT: {{ $}} |
| ; VI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; VI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; VI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX9-LABEL: name: test_load_local_s8_align1 |
| ; GFX9: liveins: $vgpr0 |
| ; GFX9-NEXT: {{ $}} |
| ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX9-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; GFX9-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX9-UNALIGNED-LABEL: name: test_load_local_s8_align1 |
| ; GFX9-UNALIGNED: liveins: $vgpr0 |
| ; GFX9-UNALIGNED-NEXT: {{ $}} |
| ; GFX9-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX9-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; GFX9-UNALIGNED-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX10-LABEL: name: test_load_local_s8_align1 |
| ; GFX10: liveins: $vgpr0 |
| ; GFX10-NEXT: {{ $}} |
| ; GFX10-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX10-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; GFX10-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX10-UNALIGNED-LABEL: name: test_load_local_s8_align1 |
| ; GFX10-UNALIGNED: liveins: $vgpr0 |
| ; GFX10-UNALIGNED-NEXT: {{ $}} |
| ; GFX10-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX10-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; GFX10-UNALIGNED-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX11-LABEL: name: test_load_local_s8_align1 |
| ; GFX11: liveins: $vgpr0 |
| ; GFX11-NEXT: {{ $}} |
| ; GFX11-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX11-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; GFX11-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX11-UNALIGNED-LABEL: name: test_load_local_s8_align1 |
| ; GFX11-UNALIGNED: liveins: $vgpr0 |
| ; GFX11-UNALIGNED-NEXT: {{ $}} |
| ; GFX11-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX11-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; GFX11-UNALIGNED-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| %0:_(p3) = COPY $vgpr0 |
| %1:_(s8) = G_LOAD %0 :: (load (s8), align 1, addrspace 3) |
| %2:_(s32) = G_ANYEXT %1 |
| $vgpr0 = COPY %2 |
| ... |
| |
| --- |
| name: test_load_local_s16_align4 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_local_s16_align4 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s16), align 4, addrspace 3) |
| ; SI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; CI-LABEL: name: test_load_local_s16_align4 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s16), align 4, addrspace 3) |
| ; CI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; CI-DS128-LABEL: name: test_load_local_s16_align4 |
| ; CI-DS128: liveins: $vgpr0 |
| ; CI-DS128-NEXT: {{ $}} |
| ; CI-DS128-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; CI-DS128-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s16), align 4, addrspace 3) |
| ; CI-DS128-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; VI-LABEL: name: test_load_local_s16_align4 |
| ; VI: liveins: $vgpr0 |
| ; VI-NEXT: {{ $}} |
| ; VI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; VI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s16), align 4, addrspace 3) |
| ; VI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX9-LABEL: name: test_load_local_s16_align4 |
| ; GFX9: liveins: $vgpr0 |
| ; GFX9-NEXT: {{ $}} |
| ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX9-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s16), align 4, addrspace 3) |
| ; GFX9-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX9-UNALIGNED-LABEL: name: test_load_local_s16_align4 |
| ; GFX9-UNALIGNED: liveins: $vgpr0 |
| ; GFX9-UNALIGNED-NEXT: {{ $}} |
| ; GFX9-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX9-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s16), align 4, addrspace 3) |
| ; GFX9-UNALIGNED-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX10-LABEL: name: test_load_local_s16_align4 |
| ; GFX10: liveins: $vgpr0 |
| ; GFX10-NEXT: {{ $}} |
| ; GFX10-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX10-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s16), align 4, addrspace 3) |
| ; GFX10-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX10-UNALIGNED-LABEL: name: test_load_local_s16_align4 |
| ; GFX10-UNALIGNED: liveins: $vgpr0 |
| ; GFX10-UNALIGNED-NEXT: {{ $}} |
| ; GFX10-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX10-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s16), align 4, addrspace 3) |
| ; GFX10-UNALIGNED-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX11-LABEL: name: test_load_local_s16_align4 |
| ; GFX11: liveins: $vgpr0 |
| ; GFX11-NEXT: {{ $}} |
| ; GFX11-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX11-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s16), align 4, addrspace 3) |
| ; GFX11-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX11-UNALIGNED-LABEL: name: test_load_local_s16_align4 |
| ; GFX11-UNALIGNED: liveins: $vgpr0 |
| ; GFX11-UNALIGNED-NEXT: {{ $}} |
| ; GFX11-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX11-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s16), align 4, addrspace 3) |
| ; GFX11-UNALIGNED-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| %0:_(p3) = COPY $vgpr0 |
| %1:_(s16) = G_LOAD %0 :: (load (s16), align 4, addrspace 3) |
| %2:_(s32) = G_ANYEXT %1 |
| $vgpr0 = COPY %2 |
| ... |
| |
| --- |
| name: test_load_local_s16_align2 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_local_s16_align2 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s16), addrspace 3) |
| ; SI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; CI-LABEL: name: test_load_local_s16_align2 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s16), addrspace 3) |
| ; CI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; CI-DS128-LABEL: name: test_load_local_s16_align2 |
| ; CI-DS128: liveins: $vgpr0 |
| ; CI-DS128-NEXT: {{ $}} |
| ; CI-DS128-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; CI-DS128-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s16), addrspace 3) |
| ; CI-DS128-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; VI-LABEL: name: test_load_local_s16_align2 |
| ; VI: liveins: $vgpr0 |
| ; VI-NEXT: {{ $}} |
| ; VI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; VI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s16), addrspace 3) |
| ; VI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX9-LABEL: name: test_load_local_s16_align2 |
| ; GFX9: liveins: $vgpr0 |
| ; GFX9-NEXT: {{ $}} |
| ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX9-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s16), addrspace 3) |
| ; GFX9-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX9-UNALIGNED-LABEL: name: test_load_local_s16_align2 |
| ; GFX9-UNALIGNED: liveins: $vgpr0 |
| ; GFX9-UNALIGNED-NEXT: {{ $}} |
| ; GFX9-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX9-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s16), addrspace 3) |
| ; GFX9-UNALIGNED-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX10-LABEL: name: test_load_local_s16_align2 |
| ; GFX10: liveins: $vgpr0 |
| ; GFX10-NEXT: {{ $}} |
| ; GFX10-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX10-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s16), addrspace 3) |
| ; GFX10-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX10-UNALIGNED-LABEL: name: test_load_local_s16_align2 |
| ; GFX10-UNALIGNED: liveins: $vgpr0 |
| ; GFX10-UNALIGNED-NEXT: {{ $}} |
| ; GFX10-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX10-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s16), addrspace 3) |
| ; GFX10-UNALIGNED-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX11-LABEL: name: test_load_local_s16_align2 |
| ; GFX11: liveins: $vgpr0 |
| ; GFX11-NEXT: {{ $}} |
| ; GFX11-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX11-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s16), addrspace 3) |
| ; GFX11-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX11-UNALIGNED-LABEL: name: test_load_local_s16_align2 |
| ; GFX11-UNALIGNED: liveins: $vgpr0 |
| ; GFX11-UNALIGNED-NEXT: {{ $}} |
| ; GFX11-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX11-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s16), addrspace 3) |
| ; GFX11-UNALIGNED-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| %0:_(p3) = COPY $vgpr0 |
| %1:_(s16) = G_LOAD %0 :: (load (s16), align 2, addrspace 3) |
| %2:_(s32) = G_ANYEXT %1 |
| $vgpr0 = COPY %2 |
| ... |
| |
| --- |
| name: test_load_local_s16_align1 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_local_s16_align1 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; SI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; SI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; SI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 1, addrspace 3) |
| ; SI-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8 |
| ; SI-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; SI-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; SI-NEXT: $vgpr0 = COPY [[OR]](s32) |
| ; |
| ; CI-LABEL: name: test_load_local_s16_align1 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; CI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; CI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; CI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 1, addrspace 3) |
| ; CI-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8 |
| ; CI-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; CI-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; CI-NEXT: $vgpr0 = COPY [[OR]](s32) |
| ; |
| ; CI-DS128-LABEL: name: test_load_local_s16_align1 |
| ; CI-DS128: liveins: $vgpr0 |
| ; CI-DS128-NEXT: {{ $}} |
| ; CI-DS128-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; CI-DS128-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; CI-DS128-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; CI-DS128-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; CI-DS128-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 1, addrspace 3) |
| ; CI-DS128-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8 |
| ; CI-DS128-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; CI-DS128-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; CI-DS128-NEXT: $vgpr0 = COPY [[OR]](s32) |
| ; |
| ; VI-LABEL: name: test_load_local_s16_align1 |
| ; VI: liveins: $vgpr0 |
| ; VI-NEXT: {{ $}} |
| ; VI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; VI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; VI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; VI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; VI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 1, addrspace 3) |
| ; VI-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8 |
| ; VI-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; VI-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; VI-NEXT: $vgpr0 = COPY [[OR]](s32) |
| ; |
| ; GFX9-LABEL: name: test_load_local_s16_align1 |
| ; GFX9: liveins: $vgpr0 |
| ; GFX9-NEXT: {{ $}} |
| ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX9-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; GFX9-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; GFX9-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX9-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 1, addrspace 3) |
| ; GFX9-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8 |
| ; GFX9-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; GFX9-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; GFX9-NEXT: $vgpr0 = COPY [[OR]](s32) |
| ; |
| ; GFX9-UNALIGNED-LABEL: name: test_load_local_s16_align1 |
| ; GFX9-UNALIGNED: liveins: $vgpr0 |
| ; GFX9-UNALIGNED-NEXT: {{ $}} |
| ; GFX9-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX9-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s16), align 1, addrspace 3) |
| ; GFX9-UNALIGNED-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX10-LABEL: name: test_load_local_s16_align1 |
| ; GFX10: liveins: $vgpr0 |
| ; GFX10-NEXT: {{ $}} |
| ; GFX10-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX10-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; GFX10-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; GFX10-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX10-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 1, addrspace 3) |
| ; GFX10-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8 |
| ; GFX10-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; GFX10-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; GFX10-NEXT: $vgpr0 = COPY [[OR]](s32) |
| ; |
| ; GFX10-UNALIGNED-LABEL: name: test_load_local_s16_align1 |
| ; GFX10-UNALIGNED: liveins: $vgpr0 |
| ; GFX10-UNALIGNED-NEXT: {{ $}} |
| ; GFX10-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX10-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s16), align 1, addrspace 3) |
| ; GFX10-UNALIGNED-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX11-LABEL: name: test_load_local_s16_align1 |
| ; GFX11: liveins: $vgpr0 |
| ; GFX11-NEXT: {{ $}} |
| ; GFX11-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX11-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; GFX11-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; GFX11-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX11-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 1, addrspace 3) |
| ; GFX11-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8 |
| ; GFX11-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; GFX11-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; GFX11-NEXT: $vgpr0 = COPY [[OR]](s32) |
| ; |
| ; GFX11-UNALIGNED-LABEL: name: test_load_local_s16_align1 |
| ; GFX11-UNALIGNED: liveins: $vgpr0 |
| ; GFX11-UNALIGNED-NEXT: {{ $}} |
| ; GFX11-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX11-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s16), align 1, addrspace 3) |
| ; GFX11-UNALIGNED-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| %0:_(p3) = COPY $vgpr0 |
| %1:_(s16) = G_LOAD %0 :: (load (s16), align 1, addrspace 3) |
| %2:_(s32) = G_ANYEXT %1 |
| $vgpr0 = COPY %2 |
| ... |
| |
| --- |
| name: test_load_local_s32_align4 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_local_s32_align4 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), addrspace 3) |
| ; SI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; CI-LABEL: name: test_load_local_s32_align4 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), addrspace 3) |
| ; CI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; CI-DS128-LABEL: name: test_load_local_s32_align4 |
| ; CI-DS128: liveins: $vgpr0 |
| ; CI-DS128-NEXT: {{ $}} |
| ; CI-DS128-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; CI-DS128-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), addrspace 3) |
| ; CI-DS128-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; VI-LABEL: name: test_load_local_s32_align4 |
| ; VI: liveins: $vgpr0 |
| ; VI-NEXT: {{ $}} |
| ; VI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; VI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), addrspace 3) |
| ; VI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX9-LABEL: name: test_load_local_s32_align4 |
| ; GFX9: liveins: $vgpr0 |
| ; GFX9-NEXT: {{ $}} |
| ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX9-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), addrspace 3) |
| ; GFX9-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX9-UNALIGNED-LABEL: name: test_load_local_s32_align4 |
| ; GFX9-UNALIGNED: liveins: $vgpr0 |
| ; GFX9-UNALIGNED-NEXT: {{ $}} |
| ; GFX9-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX9-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), addrspace 3) |
| ; GFX9-UNALIGNED-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX10-LABEL: name: test_load_local_s32_align4 |
| ; GFX10: liveins: $vgpr0 |
| ; GFX10-NEXT: {{ $}} |
| ; GFX10-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX10-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), addrspace 3) |
| ; GFX10-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX10-UNALIGNED-LABEL: name: test_load_local_s32_align4 |
| ; GFX10-UNALIGNED: liveins: $vgpr0 |
| ; GFX10-UNALIGNED-NEXT: {{ $}} |
| ; GFX10-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX10-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), addrspace 3) |
| ; GFX10-UNALIGNED-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX11-LABEL: name: test_load_local_s32_align4 |
| ; GFX11: liveins: $vgpr0 |
| ; GFX11-NEXT: {{ $}} |
| ; GFX11-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX11-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), addrspace 3) |
| ; GFX11-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX11-UNALIGNED-LABEL: name: test_load_local_s32_align4 |
| ; GFX11-UNALIGNED: liveins: $vgpr0 |
| ; GFX11-UNALIGNED-NEXT: {{ $}} |
| ; GFX11-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX11-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), addrspace 3) |
| ; GFX11-UNALIGNED-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| %0:_(p3) = COPY $vgpr0 |
| %1:_(s32) = G_LOAD %0 :: (load (s32), align 4, addrspace 3) |
| $vgpr0 = COPY %1 |
| ... |
| |
| --- |
| name: test_load_local_s32_align2 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_local_s32_align2 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; SI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s16), addrspace 3) |
| ; SI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; SI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p3) :: (load (s16) from unknown-address + 2, addrspace 3) |
| ; SI-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; SI-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; SI-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; SI-NEXT: $vgpr0 = COPY [[OR]](s32) |
| ; |
| ; CI-LABEL: name: test_load_local_s32_align2 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; CI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s16), addrspace 3) |
| ; CI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; CI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p3) :: (load (s16) from unknown-address + 2, addrspace 3) |
| ; CI-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; CI-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; CI-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; CI-NEXT: $vgpr0 = COPY [[OR]](s32) |
| ; |
| ; CI-DS128-LABEL: name: test_load_local_s32_align2 |
| ; CI-DS128: liveins: $vgpr0 |
| ; CI-DS128-NEXT: {{ $}} |
| ; CI-DS128-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; CI-DS128-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s16), addrspace 3) |
| ; CI-DS128-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; CI-DS128-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; CI-DS128-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p3) :: (load (s16) from unknown-address + 2, addrspace 3) |
| ; CI-DS128-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; CI-DS128-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; CI-DS128-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; CI-DS128-NEXT: $vgpr0 = COPY [[OR]](s32) |
| ; |
| ; VI-LABEL: name: test_load_local_s32_align2 |
| ; VI: liveins: $vgpr0 |
| ; VI-NEXT: {{ $}} |
| ; VI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; VI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s16), addrspace 3) |
| ; VI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; VI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; VI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p3) :: (load (s16) from unknown-address + 2, addrspace 3) |
| ; VI-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; VI-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; VI-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; VI-NEXT: $vgpr0 = COPY [[OR]](s32) |
| ; |
| ; GFX9-LABEL: name: test_load_local_s32_align2 |
| ; GFX9: liveins: $vgpr0 |
| ; GFX9-NEXT: {{ $}} |
| ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX9-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s16), addrspace 3) |
| ; GFX9-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; GFX9-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX9-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p3) :: (load (s16) from unknown-address + 2, addrspace 3) |
| ; GFX9-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; GFX9-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; GFX9-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; GFX9-NEXT: $vgpr0 = COPY [[OR]](s32) |
| ; |
| ; GFX9-UNALIGNED-LABEL: name: test_load_local_s32_align2 |
| ; GFX9-UNALIGNED: liveins: $vgpr0 |
| ; GFX9-UNALIGNED-NEXT: {{ $}} |
| ; GFX9-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX9-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), align 2, addrspace 3) |
| ; GFX9-UNALIGNED-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX10-LABEL: name: test_load_local_s32_align2 |
| ; GFX10: liveins: $vgpr0 |
| ; GFX10-NEXT: {{ $}} |
| ; GFX10-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX10-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s16), addrspace 3) |
| ; GFX10-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; GFX10-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX10-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p3) :: (load (s16) from unknown-address + 2, addrspace 3) |
| ; GFX10-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; GFX10-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; GFX10-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; GFX10-NEXT: $vgpr0 = COPY [[OR]](s32) |
| ; |
| ; GFX10-UNALIGNED-LABEL: name: test_load_local_s32_align2 |
| ; GFX10-UNALIGNED: liveins: $vgpr0 |
| ; GFX10-UNALIGNED-NEXT: {{ $}} |
| ; GFX10-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX10-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), align 2, addrspace 3) |
| ; GFX10-UNALIGNED-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX11-LABEL: name: test_load_local_s32_align2 |
| ; GFX11: liveins: $vgpr0 |
| ; GFX11-NEXT: {{ $}} |
| ; GFX11-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX11-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s16), addrspace 3) |
| ; GFX11-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; GFX11-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX11-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p3) :: (load (s16) from unknown-address + 2, addrspace 3) |
| ; GFX11-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; GFX11-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; GFX11-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; GFX11-NEXT: $vgpr0 = COPY [[OR]](s32) |
| ; |
| ; GFX11-UNALIGNED-LABEL: name: test_load_local_s32_align2 |
| ; GFX11-UNALIGNED: liveins: $vgpr0 |
| ; GFX11-UNALIGNED-NEXT: {{ $}} |
| ; GFX11-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX11-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), align 2, addrspace 3) |
| ; GFX11-UNALIGNED-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| %0:_(p3) = COPY $vgpr0 |
| %1:_(s32) = G_LOAD %0 :: (load (s32), align 2, addrspace 3) |
| $vgpr0 = COPY %1 |
| ... |
| |
| --- |
| name: test_load_local_s32_align1 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_local_s32_align1 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; SI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; SI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; SI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; SI-NEXT: [[ZEXTLOAD1:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 1, addrspace 3) |
| ; SI-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8 |
| ; SI-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[ZEXTLOAD1]], [[C1]](s32) |
| ; SI-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; SI-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; SI-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C2]](s32) |
| ; SI-NEXT: [[ZEXTLOAD2:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD1]](p3) :: (load (s8) from unknown-address + 2, addrspace 3) |
| ; SI-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p3) = G_PTR_ADD [[PTR_ADD1]], [[C]](s32) |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD2]](p3) :: (load (s8) from unknown-address + 3, addrspace 3) |
| ; SI-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; SI-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[SHL1]], [[ZEXTLOAD2]] |
| ; SI-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; SI-NEXT: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[OR1]], [[C3]](s32) |
| ; SI-NEXT: [[OR2:%[0-9]+]]:_(s32) = G_OR [[SHL2]], [[OR]] |
| ; SI-NEXT: $vgpr0 = COPY [[OR2]](s32) |
| ; |
| ; CI-LABEL: name: test_load_local_s32_align1 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; CI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; CI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; CI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; CI-NEXT: [[ZEXTLOAD1:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 1, addrspace 3) |
| ; CI-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8 |
| ; CI-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[ZEXTLOAD1]], [[C1]](s32) |
| ; CI-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; CI-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; CI-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C2]](s32) |
| ; CI-NEXT: [[ZEXTLOAD2:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD1]](p3) :: (load (s8) from unknown-address + 2, addrspace 3) |
| ; CI-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p3) = G_PTR_ADD [[PTR_ADD1]], [[C]](s32) |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD2]](p3) :: (load (s8) from unknown-address + 3, addrspace 3) |
| ; CI-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; CI-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[SHL1]], [[ZEXTLOAD2]] |
| ; CI-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; CI-NEXT: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[OR1]], [[C3]](s32) |
| ; CI-NEXT: [[OR2:%[0-9]+]]:_(s32) = G_OR [[SHL2]], [[OR]] |
| ; CI-NEXT: $vgpr0 = COPY [[OR2]](s32) |
| ; |
| ; CI-DS128-LABEL: name: test_load_local_s32_align1 |
| ; CI-DS128: liveins: $vgpr0 |
| ; CI-DS128-NEXT: {{ $}} |
| ; CI-DS128-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; CI-DS128-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; CI-DS128-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; CI-DS128-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; CI-DS128-NEXT: [[ZEXTLOAD1:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 1, addrspace 3) |
| ; CI-DS128-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8 |
| ; CI-DS128-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[ZEXTLOAD1]], [[C1]](s32) |
| ; CI-DS128-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; CI-DS128-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; CI-DS128-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C2]](s32) |
| ; CI-DS128-NEXT: [[ZEXTLOAD2:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD1]](p3) :: (load (s8) from unknown-address + 2, addrspace 3) |
| ; CI-DS128-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p3) = G_PTR_ADD [[PTR_ADD1]], [[C]](s32) |
| ; CI-DS128-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD2]](p3) :: (load (s8) from unknown-address + 3, addrspace 3) |
| ; CI-DS128-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; CI-DS128-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[SHL1]], [[ZEXTLOAD2]] |
| ; CI-DS128-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; CI-DS128-NEXT: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[OR1]], [[C3]](s32) |
| ; CI-DS128-NEXT: [[OR2:%[0-9]+]]:_(s32) = G_OR [[SHL2]], [[OR]] |
| ; CI-DS128-NEXT: $vgpr0 = COPY [[OR2]](s32) |
| ; |
| ; VI-LABEL: name: test_load_local_s32_align1 |
| ; VI: liveins: $vgpr0 |
| ; VI-NEXT: {{ $}} |
| ; VI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; VI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; VI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; VI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; VI-NEXT: [[ZEXTLOAD1:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 1, addrspace 3) |
| ; VI-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8 |
| ; VI-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[ZEXTLOAD1]], [[C1]](s32) |
| ; VI-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; VI-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; VI-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C2]](s32) |
| ; VI-NEXT: [[ZEXTLOAD2:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD1]](p3) :: (load (s8) from unknown-address + 2, addrspace 3) |
| ; VI-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p3) = G_PTR_ADD [[PTR_ADD1]], [[C]](s32) |
| ; VI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD2]](p3) :: (load (s8) from unknown-address + 3, addrspace 3) |
| ; VI-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; VI-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[SHL1]], [[ZEXTLOAD2]] |
| ; VI-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; VI-NEXT: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[OR1]], [[C3]](s32) |
| ; VI-NEXT: [[OR2:%[0-9]+]]:_(s32) = G_OR [[SHL2]], [[OR]] |
| ; VI-NEXT: $vgpr0 = COPY [[OR2]](s32) |
| ; |
| ; GFX9-LABEL: name: test_load_local_s32_align1 |
| ; GFX9: liveins: $vgpr0 |
| ; GFX9-NEXT: {{ $}} |
| ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX9-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; GFX9-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; GFX9-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX9-NEXT: [[ZEXTLOAD1:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 1, addrspace 3) |
| ; GFX9-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8 |
| ; GFX9-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[ZEXTLOAD1]], [[C1]](s32) |
| ; GFX9-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; GFX9-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; GFX9-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C2]](s32) |
| ; GFX9-NEXT: [[ZEXTLOAD2:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD1]](p3) :: (load (s8) from unknown-address + 2, addrspace 3) |
| ; GFX9-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p3) = G_PTR_ADD [[PTR_ADD1]], [[C]](s32) |
| ; GFX9-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD2]](p3) :: (load (s8) from unknown-address + 3, addrspace 3) |
| ; GFX9-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; GFX9-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[SHL1]], [[ZEXTLOAD2]] |
| ; GFX9-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; GFX9-NEXT: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[OR1]], [[C3]](s32) |
| ; GFX9-NEXT: [[OR2:%[0-9]+]]:_(s32) = G_OR [[SHL2]], [[OR]] |
| ; GFX9-NEXT: $vgpr0 = COPY [[OR2]](s32) |
| ; |
| ; GFX9-UNALIGNED-LABEL: name: test_load_local_s32_align1 |
| ; GFX9-UNALIGNED: liveins: $vgpr0 |
| ; GFX9-UNALIGNED-NEXT: {{ $}} |
| ; GFX9-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX9-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), align 1, addrspace 3) |
| ; GFX9-UNALIGNED-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX10-LABEL: name: test_load_local_s32_align1 |
| ; GFX10: liveins: $vgpr0 |
| ; GFX10-NEXT: {{ $}} |
| ; GFX10-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX10-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; GFX10-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; GFX10-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX10-NEXT: [[ZEXTLOAD1:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 1, addrspace 3) |
| ; GFX10-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8 |
| ; GFX10-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[ZEXTLOAD1]], [[C1]](s32) |
| ; GFX10-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; GFX10-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; GFX10-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C2]](s32) |
| ; GFX10-NEXT: [[ZEXTLOAD2:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD1]](p3) :: (load (s8) from unknown-address + 2, addrspace 3) |
| ; GFX10-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p3) = G_PTR_ADD [[PTR_ADD1]], [[C]](s32) |
| ; GFX10-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD2]](p3) :: (load (s8) from unknown-address + 3, addrspace 3) |
| ; GFX10-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; GFX10-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[SHL1]], [[ZEXTLOAD2]] |
| ; GFX10-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; GFX10-NEXT: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[OR1]], [[C3]](s32) |
| ; GFX10-NEXT: [[OR2:%[0-9]+]]:_(s32) = G_OR [[SHL2]], [[OR]] |
| ; GFX10-NEXT: $vgpr0 = COPY [[OR2]](s32) |
| ; |
| ; GFX10-UNALIGNED-LABEL: name: test_load_local_s32_align1 |
| ; GFX10-UNALIGNED: liveins: $vgpr0 |
| ; GFX10-UNALIGNED-NEXT: {{ $}} |
| ; GFX10-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX10-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), align 1, addrspace 3) |
| ; GFX10-UNALIGNED-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX11-LABEL: name: test_load_local_s32_align1 |
| ; GFX11: liveins: $vgpr0 |
| ; GFX11-NEXT: {{ $}} |
| ; GFX11-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX11-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; GFX11-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; GFX11-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX11-NEXT: [[ZEXTLOAD1:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 1, addrspace 3) |
| ; GFX11-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8 |
| ; GFX11-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[ZEXTLOAD1]], [[C1]](s32) |
| ; GFX11-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; GFX11-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; GFX11-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C2]](s32) |
| ; GFX11-NEXT: [[ZEXTLOAD2:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD1]](p3) :: (load (s8) from unknown-address + 2, addrspace 3) |
| ; GFX11-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p3) = G_PTR_ADD [[PTR_ADD1]], [[C]](s32) |
| ; GFX11-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD2]](p3) :: (load (s8) from unknown-address + 3, addrspace 3) |
| ; GFX11-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; GFX11-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[SHL1]], [[ZEXTLOAD2]] |
| ; GFX11-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; GFX11-NEXT: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[OR1]], [[C3]](s32) |
| ; GFX11-NEXT: [[OR2:%[0-9]+]]:_(s32) = G_OR [[SHL2]], [[OR]] |
| ; GFX11-NEXT: $vgpr0 = COPY [[OR2]](s32) |
| ; |
| ; GFX11-UNALIGNED-LABEL: name: test_load_local_s32_align1 |
| ; GFX11-UNALIGNED: liveins: $vgpr0 |
| ; GFX11-UNALIGNED-NEXT: {{ $}} |
| ; GFX11-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX11-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), align 1, addrspace 3) |
| ; GFX11-UNALIGNED-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| %0:_(p3) = COPY $vgpr0 |
| %1:_(s32) = G_LOAD %0 :: (load (s32), align 1, addrspace 3) |
| $vgpr0 = COPY %1 |
| ... |
| |
| --- |
| name: test_load_local_s24_align8 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_local_s24_align8 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), align 8, addrspace 3) |
| ; SI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; CI-LABEL: name: test_load_local_s24_align8 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), align 8, addrspace 3) |
| ; CI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; CI-DS128-LABEL: name: test_load_local_s24_align8 |
| ; CI-DS128: liveins: $vgpr0 |
| ; CI-DS128-NEXT: {{ $}} |
| ; CI-DS128-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; CI-DS128-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), align 8, addrspace 3) |
| ; CI-DS128-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; VI-LABEL: name: test_load_local_s24_align8 |
| ; VI: liveins: $vgpr0 |
| ; VI-NEXT: {{ $}} |
| ; VI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; VI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), align 8, addrspace 3) |
| ; VI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX9-LABEL: name: test_load_local_s24_align8 |
| ; GFX9: liveins: $vgpr0 |
| ; GFX9-NEXT: {{ $}} |
| ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX9-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), align 8, addrspace 3) |
| ; GFX9-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX9-UNALIGNED-LABEL: name: test_load_local_s24_align8 |
| ; GFX9-UNALIGNED: liveins: $vgpr0 |
| ; GFX9-UNALIGNED-NEXT: {{ $}} |
| ; GFX9-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX9-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), align 8, addrspace 3) |
| ; GFX9-UNALIGNED-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX10-LABEL: name: test_load_local_s24_align8 |
| ; GFX10: liveins: $vgpr0 |
| ; GFX10-NEXT: {{ $}} |
| ; GFX10-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX10-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), align 8, addrspace 3) |
| ; GFX10-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX10-UNALIGNED-LABEL: name: test_load_local_s24_align8 |
| ; GFX10-UNALIGNED: liveins: $vgpr0 |
| ; GFX10-UNALIGNED-NEXT: {{ $}} |
| ; GFX10-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX10-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), align 8, addrspace 3) |
| ; GFX10-UNALIGNED-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX11-LABEL: name: test_load_local_s24_align8 |
| ; GFX11: liveins: $vgpr0 |
| ; GFX11-NEXT: {{ $}} |
| ; GFX11-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX11-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), align 8, addrspace 3) |
| ; GFX11-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX11-UNALIGNED-LABEL: name: test_load_local_s24_align8 |
| ; GFX11-UNALIGNED: liveins: $vgpr0 |
| ; GFX11-UNALIGNED-NEXT: {{ $}} |
| ; GFX11-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX11-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), align 8, addrspace 3) |
| ; GFX11-UNALIGNED-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| %0:_(p3) = COPY $vgpr0 |
| %1:_(s24) = G_LOAD %0 :: (load (s24), align 8, addrspace 3) |
| %2:_(s32) = G_ANYEXT %1 |
| $vgpr0 = COPY %2 |
| ... |
| |
| --- |
| name: test_load_local_s24_align4 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_local_s24_align4 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), addrspace 3) |
| ; SI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; CI-LABEL: name: test_load_local_s24_align4 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), addrspace 3) |
| ; CI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; CI-DS128-LABEL: name: test_load_local_s24_align4 |
| ; CI-DS128: liveins: $vgpr0 |
| ; CI-DS128-NEXT: {{ $}} |
| ; CI-DS128-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; CI-DS128-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), addrspace 3) |
| ; CI-DS128-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; VI-LABEL: name: test_load_local_s24_align4 |
| ; VI: liveins: $vgpr0 |
| ; VI-NEXT: {{ $}} |
| ; VI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; VI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), addrspace 3) |
| ; VI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX9-LABEL: name: test_load_local_s24_align4 |
| ; GFX9: liveins: $vgpr0 |
| ; GFX9-NEXT: {{ $}} |
| ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX9-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), addrspace 3) |
| ; GFX9-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX9-UNALIGNED-LABEL: name: test_load_local_s24_align4 |
| ; GFX9-UNALIGNED: liveins: $vgpr0 |
| ; GFX9-UNALIGNED-NEXT: {{ $}} |
| ; GFX9-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX9-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), addrspace 3) |
| ; GFX9-UNALIGNED-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX10-LABEL: name: test_load_local_s24_align4 |
| ; GFX10: liveins: $vgpr0 |
| ; GFX10-NEXT: {{ $}} |
| ; GFX10-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX10-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), addrspace 3) |
| ; GFX10-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX10-UNALIGNED-LABEL: name: test_load_local_s24_align4 |
| ; GFX10-UNALIGNED: liveins: $vgpr0 |
| ; GFX10-UNALIGNED-NEXT: {{ $}} |
| ; GFX10-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX10-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), addrspace 3) |
| ; GFX10-UNALIGNED-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX11-LABEL: name: test_load_local_s24_align4 |
| ; GFX11: liveins: $vgpr0 |
| ; GFX11-NEXT: {{ $}} |
| ; GFX11-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX11-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), addrspace 3) |
| ; GFX11-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX11-UNALIGNED-LABEL: name: test_load_local_s24_align4 |
| ; GFX11-UNALIGNED: liveins: $vgpr0 |
| ; GFX11-UNALIGNED-NEXT: {{ $}} |
| ; GFX11-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX11-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), addrspace 3) |
| ; GFX11-UNALIGNED-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| %0:_(p3) = COPY $vgpr0 |
| %1:_(s24) = G_LOAD %0 :: (load (s24), align 4, addrspace 3) |
| %2:_(s32) = G_ANYEXT %1 |
| $vgpr0 = COPY %2 |
| ... |
| |
| --- |
| name: test_load_local_s24_align2 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_local_s24_align2 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; SI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s16), addrspace 3) |
| ; SI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; SI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 2, align 2, addrspace 3) |
| ; SI-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; SI-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; SI-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; SI-NEXT: $vgpr0 = COPY [[OR]](s32) |
| ; |
| ; CI-LABEL: name: test_load_local_s24_align2 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; CI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s16), addrspace 3) |
| ; CI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; CI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 2, align 2, addrspace 3) |
| ; CI-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; CI-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; CI-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; CI-NEXT: $vgpr0 = COPY [[OR]](s32) |
| ; |
| ; CI-DS128-LABEL: name: test_load_local_s24_align2 |
| ; CI-DS128: liveins: $vgpr0 |
| ; CI-DS128-NEXT: {{ $}} |
| ; CI-DS128-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; CI-DS128-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s16), addrspace 3) |
| ; CI-DS128-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; CI-DS128-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; CI-DS128-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 2, align 2, addrspace 3) |
| ; CI-DS128-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; CI-DS128-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; CI-DS128-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; CI-DS128-NEXT: $vgpr0 = COPY [[OR]](s32) |
| ; |
| ; VI-LABEL: name: test_load_local_s24_align2 |
| ; VI: liveins: $vgpr0 |
| ; VI-NEXT: {{ $}} |
| ; VI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; VI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s16), addrspace 3) |
| ; VI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; VI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; VI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 2, align 2, addrspace 3) |
| ; VI-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; VI-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; VI-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; VI-NEXT: $vgpr0 = COPY [[OR]](s32) |
| ; |
| ; GFX9-LABEL: name: test_load_local_s24_align2 |
| ; GFX9: liveins: $vgpr0 |
| ; GFX9-NEXT: {{ $}} |
| ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX9-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s16), addrspace 3) |
| ; GFX9-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; GFX9-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX9-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 2, align 2, addrspace 3) |
| ; GFX9-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; GFX9-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; GFX9-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; GFX9-NEXT: $vgpr0 = COPY [[OR]](s32) |
| ; |
| ; GFX9-UNALIGNED-LABEL: name: test_load_local_s24_align2 |
| ; GFX9-UNALIGNED: liveins: $vgpr0 |
| ; GFX9-UNALIGNED-NEXT: {{ $}} |
| ; GFX9-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX9-UNALIGNED-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s16), addrspace 3) |
| ; GFX9-UNALIGNED-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; GFX9-UNALIGNED-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX9-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 2, align 2, addrspace 3) |
| ; GFX9-UNALIGNED-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; GFX9-UNALIGNED-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; GFX9-UNALIGNED-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; GFX9-UNALIGNED-NEXT: $vgpr0 = COPY [[OR]](s32) |
| ; |
| ; GFX10-LABEL: name: test_load_local_s24_align2 |
| ; GFX10: liveins: $vgpr0 |
| ; GFX10-NEXT: {{ $}} |
| ; GFX10-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX10-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s16), addrspace 3) |
| ; GFX10-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; GFX10-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX10-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 2, align 2, addrspace 3) |
| ; GFX10-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; GFX10-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; GFX10-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; GFX10-NEXT: $vgpr0 = COPY [[OR]](s32) |
| ; |
| ; GFX10-UNALIGNED-LABEL: name: test_load_local_s24_align2 |
| ; GFX10-UNALIGNED: liveins: $vgpr0 |
| ; GFX10-UNALIGNED-NEXT: {{ $}} |
| ; GFX10-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX10-UNALIGNED-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s16), addrspace 3) |
| ; GFX10-UNALIGNED-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; GFX10-UNALIGNED-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX10-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 2, align 2, addrspace 3) |
| ; GFX10-UNALIGNED-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; GFX10-UNALIGNED-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; GFX10-UNALIGNED-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; GFX10-UNALIGNED-NEXT: $vgpr0 = COPY [[OR]](s32) |
| ; |
| ; GFX11-LABEL: name: test_load_local_s24_align2 |
| ; GFX11: liveins: $vgpr0 |
| ; GFX11-NEXT: {{ $}} |
| ; GFX11-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX11-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s16), addrspace 3) |
| ; GFX11-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; GFX11-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX11-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 2, align 2, addrspace 3) |
| ; GFX11-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; GFX11-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; GFX11-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; GFX11-NEXT: $vgpr0 = COPY [[OR]](s32) |
| ; |
| ; GFX11-UNALIGNED-LABEL: name: test_load_local_s24_align2 |
| ; GFX11-UNALIGNED: liveins: $vgpr0 |
| ; GFX11-UNALIGNED-NEXT: {{ $}} |
| ; GFX11-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX11-UNALIGNED-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s16), addrspace 3) |
| ; GFX11-UNALIGNED-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; GFX11-UNALIGNED-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX11-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 2, align 2, addrspace 3) |
| ; GFX11-UNALIGNED-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; GFX11-UNALIGNED-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; GFX11-UNALIGNED-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; GFX11-UNALIGNED-NEXT: $vgpr0 = COPY [[OR]](s32) |
| %0:_(p3) = COPY $vgpr0 |
| %1:_(s24) = G_LOAD %0 :: (load (s24), align 2, addrspace 3) |
| %2:_(s32) = G_ANYEXT %1 |
| $vgpr0 = COPY %2 |
| ... |
| |
| --- |
| name: test_load_local_s24_align1 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_local_s24_align1 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; SI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; SI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; SI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; SI-NEXT: [[ZEXTLOAD1:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 1, addrspace 3) |
| ; SI-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8 |
| ; SI-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[ZEXTLOAD1]], [[C1]](s32) |
| ; SI-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; SI-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; SI-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C2]](s32) |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD1]](p3) :: (load (s8) from unknown-address + 2, addrspace 3) |
| ; SI-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; SI-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C3]](s32) |
| ; SI-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[SHL1]], [[OR]] |
| ; SI-NEXT: $vgpr0 = COPY [[OR1]](s32) |
| ; |
| ; CI-LABEL: name: test_load_local_s24_align1 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; CI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; CI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; CI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; CI-NEXT: [[ZEXTLOAD1:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 1, addrspace 3) |
| ; CI-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8 |
| ; CI-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[ZEXTLOAD1]], [[C1]](s32) |
| ; CI-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; CI-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; CI-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C2]](s32) |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD1]](p3) :: (load (s8) from unknown-address + 2, addrspace 3) |
| ; CI-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; CI-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C3]](s32) |
| ; CI-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[SHL1]], [[OR]] |
| ; CI-NEXT: $vgpr0 = COPY [[OR1]](s32) |
| ; |
| ; CI-DS128-LABEL: name: test_load_local_s24_align1 |
| ; CI-DS128: liveins: $vgpr0 |
| ; CI-DS128-NEXT: {{ $}} |
| ; CI-DS128-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; CI-DS128-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; CI-DS128-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; CI-DS128-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; CI-DS128-NEXT: [[ZEXTLOAD1:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 1, addrspace 3) |
| ; CI-DS128-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8 |
| ; CI-DS128-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[ZEXTLOAD1]], [[C1]](s32) |
| ; CI-DS128-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; CI-DS128-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; CI-DS128-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C2]](s32) |
| ; CI-DS128-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD1]](p3) :: (load (s8) from unknown-address + 2, addrspace 3) |
| ; CI-DS128-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; CI-DS128-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C3]](s32) |
| ; CI-DS128-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[SHL1]], [[OR]] |
| ; CI-DS128-NEXT: $vgpr0 = COPY [[OR1]](s32) |
| ; |
| ; VI-LABEL: name: test_load_local_s24_align1 |
| ; VI: liveins: $vgpr0 |
| ; VI-NEXT: {{ $}} |
| ; VI-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; VI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; VI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; VI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; VI-NEXT: [[ZEXTLOAD1:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 1, addrspace 3) |
| ; VI-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8 |
| ; VI-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[ZEXTLOAD1]], [[C1]](s32) |
| ; VI-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; VI-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; VI-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C2]](s32) |
| ; VI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD1]](p3) :: (load (s8) from unknown-address + 2, addrspace 3) |
| ; VI-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; VI-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C3]](s32) |
| ; VI-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[SHL1]], [[OR]] |
| ; VI-NEXT: $vgpr0 = COPY [[OR1]](s32) |
| ; |
| ; GFX9-LABEL: name: test_load_local_s24_align1 |
| ; GFX9: liveins: $vgpr0 |
| ; GFX9-NEXT: {{ $}} |
| ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX9-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; GFX9-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; GFX9-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX9-NEXT: [[ZEXTLOAD1:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 1, addrspace 3) |
| ; GFX9-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8 |
| ; GFX9-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[ZEXTLOAD1]], [[C1]](s32) |
| ; GFX9-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; GFX9-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; GFX9-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C2]](s32) |
| ; GFX9-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD1]](p3) :: (load (s8) from unknown-address + 2, addrspace 3) |
| ; GFX9-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; GFX9-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C3]](s32) |
| ; GFX9-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[SHL1]], [[OR]] |
| ; GFX9-NEXT: $vgpr0 = COPY [[OR1]](s32) |
| ; |
| ; GFX9-UNALIGNED-LABEL: name: test_load_local_s24_align1 |
| ; GFX9-UNALIGNED: liveins: $vgpr0 |
| ; GFX9-UNALIGNED-NEXT: {{ $}} |
| ; GFX9-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX9-UNALIGNED-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s16), align 1, addrspace 3) |
| ; GFX9-UNALIGNED-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; GFX9-UNALIGNED-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX9-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 2, addrspace 3) |
| ; GFX9-UNALIGNED-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; GFX9-UNALIGNED-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; GFX9-UNALIGNED-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; GFX9-UNALIGNED-NEXT: $vgpr0 = COPY [[OR]](s32) |
| ; |
| ; GFX10-LABEL: name: test_load_local_s24_align1 |
| ; GFX10: liveins: $vgpr0 |
| ; GFX10-NEXT: {{ $}} |
| ; GFX10-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX10-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; GFX10-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; GFX10-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX10-NEXT: [[ZEXTLOAD1:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 1, addrspace 3) |
| ; GFX10-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8 |
| ; GFX10-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[ZEXTLOAD1]], [[C1]](s32) |
| ; GFX10-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; GFX10-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; GFX10-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C2]](s32) |
| ; GFX10-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD1]](p3) :: (load (s8) from unknown-address + 2, addrspace 3) |
| ; GFX10-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; GFX10-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C3]](s32) |
| ; GFX10-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[SHL1]], [[OR]] |
| ; GFX10-NEXT: $vgpr0 = COPY [[OR1]](s32) |
| ; |
| ; GFX10-UNALIGNED-LABEL: name: test_load_local_s24_align1 |
| ; GFX10-UNALIGNED: liveins: $vgpr0 |
| ; GFX10-UNALIGNED-NEXT: {{ $}} |
| ; GFX10-UNALIGNED-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX10-UNALIGNED-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s16), align 1, addrspace 3) |
| ; GFX10-UNALIGNED-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; GFX10-UNALIGNED-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX10-UNALIGNED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 2, addrspace 3) |
| ; GFX10-UNALIGNED-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; GFX10-UNALIGNED-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C1]](s32) |
| ; GFX10-UNALIGNED-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; GFX10-UNALIGNED-NEXT: $vgpr0 = COPY [[OR]](s32) |
| ; |
| ; GFX11-LABEL: name: test_load_local_s24_align1 |
| ; GFX11: liveins: $vgpr0 |
| ; GFX11-NEXT: {{ $}} |
| ; GFX11-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 |
| ; GFX11-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p3) :: (load (s8), addrspace 3) |
| ; GFX11-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; GFX11-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX11-NEXT: [[ZEXTLOAD1:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD]](p3) :: (load (s8) from unknown-address + 1, addrspace 3) |
| ; GFX11-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8 |
| ; GFX11-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[ZEXTLOAD1]], [[C1]](s32) |
| ; GFX11-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[SHL]], [[ZEXTLOAD]] |
| ; GFX11-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; GFX11-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C2]](s32) |
| ; GFX11-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD1]](p3) :: (load (s8) from unknown-address + 2, addrspace 3) |
| ; GFX11-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; GFX11-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[LOAD]], [[C3]](s32) |
| ; GFX11-NEXT: [[OR1:%[0-9]+]]:_(s32) = |