| # 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 -O0 -run-pass=legalizer -global-isel-abort=0 %s -o - | FileCheck -check-prefix=CI %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 -global-isel-abort=0 %s -o - | FileCheck -check-prefix=GFX9 %s |
| # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1010 -O0 -run-pass=legalizer -global-isel-abort=0 %s -o - | FileCheck -check-prefix=GFX10 %s |
| # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1100 -O0 -run-pass=legalizer -global-isel-abort=0 %s -o - | FileCheck -check-prefix=GFX11 %s |
| |
| --- |
| name: test_load_private_s1_align1 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_private_s1_align1 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; 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_private_s1_align1 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; 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) |
| ; |
| ; VI-LABEL: name: test_load_private_s1_align1 |
| ; VI: liveins: $vgpr0 |
| ; VI-NEXT: {{ $}} |
| ; VI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; VI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; 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_private_s1_align1 |
| ; GFX9: liveins: $vgpr0 |
| ; GFX9-NEXT: {{ $}} |
| ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX9-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; 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) |
| ; |
| ; GFX10-LABEL: name: test_load_private_s1_align1 |
| ; GFX10: liveins: $vgpr0 |
| ; GFX10-NEXT: {{ $}} |
| ; GFX10-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX10-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; 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) |
| ; |
| ; GFX11-LABEL: name: test_load_private_s1_align1 |
| ; GFX11: liveins: $vgpr0 |
| ; GFX11-NEXT: {{ $}} |
| ; GFX11-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX11-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; 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) |
| %0:_(p5) = COPY $vgpr0 |
| %1:_(s1) = G_LOAD %0 :: (load (s1), align 1, addrspace 5) |
| %2:_(s32) = G_ZEXT %1 |
| $vgpr0 = COPY %2 |
| ... |
| |
| --- |
| name: test_load_private_s2_align1 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_private_s2_align1 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; 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_private_s2_align1 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; 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) |
| ; |
| ; VI-LABEL: name: test_load_private_s2_align1 |
| ; VI: liveins: $vgpr0 |
| ; VI-NEXT: {{ $}} |
| ; VI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; VI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; 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_private_s2_align1 |
| ; GFX9: liveins: $vgpr0 |
| ; GFX9-NEXT: {{ $}} |
| ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX9-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; 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) |
| ; |
| ; GFX10-LABEL: name: test_load_private_s2_align1 |
| ; GFX10: liveins: $vgpr0 |
| ; GFX10-NEXT: {{ $}} |
| ; GFX10-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX10-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; 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) |
| ; |
| ; GFX11-LABEL: name: test_load_private_s2_align1 |
| ; GFX11: liveins: $vgpr0 |
| ; GFX11-NEXT: {{ $}} |
| ; GFX11-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX11-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; 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) |
| %0:_(p5) = COPY $vgpr0 |
| %1:_(s2) = G_LOAD %0 :: (load (s2), align 1, addrspace 5) |
| %2:_(s32) = G_ZEXT %1 |
| $vgpr0 = COPY %2 |
| ... |
| |
| --- |
| name: test_load_private_s8_align4 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_private_s8_align4 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s8), align 4, addrspace 5) |
| ; SI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; CI-LABEL: name: test_load_private_s8_align4 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s8), align 4, addrspace 5) |
| ; CI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; VI-LABEL: name: test_load_private_s8_align4 |
| ; VI: liveins: $vgpr0 |
| ; VI-NEXT: {{ $}} |
| ; VI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; VI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s8), align 4, addrspace 5) |
| ; VI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX9-LABEL: name: test_load_private_s8_align4 |
| ; GFX9: liveins: $vgpr0 |
| ; GFX9-NEXT: {{ $}} |
| ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX9-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s8), align 4, addrspace 5) |
| ; GFX9-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX10-LABEL: name: test_load_private_s8_align4 |
| ; GFX10: liveins: $vgpr0 |
| ; GFX10-NEXT: {{ $}} |
| ; GFX10-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX10-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s8), align 4, addrspace 5) |
| ; GFX10-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX11-LABEL: name: test_load_private_s8_align4 |
| ; GFX11: liveins: $vgpr0 |
| ; GFX11-NEXT: {{ $}} |
| ; GFX11-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX11-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s8), align 4, addrspace 5) |
| ; GFX11-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| %0:_(p5) = COPY $vgpr0 |
| %1:_(s8) = G_LOAD %0 :: (load (s8), align 4, addrspace 5) |
| %2:_(s32) = G_ANYEXT %1 |
| $vgpr0 = COPY %2 |
| ... |
| |
| --- |
| name: test_load_private_s8_align1 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_private_s8_align1 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; SI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; CI-LABEL: name: test_load_private_s8_align1 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; CI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; VI-LABEL: name: test_load_private_s8_align1 |
| ; VI: liveins: $vgpr0 |
| ; VI-NEXT: {{ $}} |
| ; VI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; VI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; VI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX9-LABEL: name: test_load_private_s8_align1 |
| ; GFX9: liveins: $vgpr0 |
| ; GFX9-NEXT: {{ $}} |
| ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX9-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; GFX9-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX10-LABEL: name: test_load_private_s8_align1 |
| ; GFX10: liveins: $vgpr0 |
| ; GFX10-NEXT: {{ $}} |
| ; GFX10-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX10-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; GFX10-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX11-LABEL: name: test_load_private_s8_align1 |
| ; GFX11: liveins: $vgpr0 |
| ; GFX11-NEXT: {{ $}} |
| ; GFX11-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX11-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; GFX11-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| %0:_(p5) = COPY $vgpr0 |
| %1:_(s8) = G_LOAD %0 :: (load (s8), align 1, addrspace 5) |
| %2:_(s32) = G_ANYEXT %1 |
| $vgpr0 = COPY %2 |
| ... |
| |
| --- |
| name: test_load_private_s16_align4 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_private_s16_align4 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s16), align 4, addrspace 5) |
| ; SI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; CI-LABEL: name: test_load_private_s16_align4 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s16), align 4, addrspace 5) |
| ; CI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; VI-LABEL: name: test_load_private_s16_align4 |
| ; VI: liveins: $vgpr0 |
| ; VI-NEXT: {{ $}} |
| ; VI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; VI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s16), align 4, addrspace 5) |
| ; VI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX9-LABEL: name: test_load_private_s16_align4 |
| ; GFX9: liveins: $vgpr0 |
| ; GFX9-NEXT: {{ $}} |
| ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX9-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s16), align 4, addrspace 5) |
| ; GFX9-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX10-LABEL: name: test_load_private_s16_align4 |
| ; GFX10: liveins: $vgpr0 |
| ; GFX10-NEXT: {{ $}} |
| ; GFX10-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX10-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s16), align 4, addrspace 5) |
| ; GFX10-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX11-LABEL: name: test_load_private_s16_align4 |
| ; GFX11: liveins: $vgpr0 |
| ; GFX11-NEXT: {{ $}} |
| ; GFX11-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX11-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s16), align 4, addrspace 5) |
| ; GFX11-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| %0:_(p5) = COPY $vgpr0 |
| %1:_(s16) = G_LOAD %0 :: (load (s16), align 4, addrspace 5) |
| %2:_(s32) = G_ANYEXT %1 |
| $vgpr0 = COPY %2 |
| ... |
| |
| --- |
| name: test_load_private_s16_align2 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_private_s16_align2 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s16), addrspace 5) |
| ; SI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; CI-LABEL: name: test_load_private_s16_align2 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s16), addrspace 5) |
| ; CI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; VI-LABEL: name: test_load_private_s16_align2 |
| ; VI: liveins: $vgpr0 |
| ; VI-NEXT: {{ $}} |
| ; VI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; VI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s16), addrspace 5) |
| ; VI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX9-LABEL: name: test_load_private_s16_align2 |
| ; GFX9: liveins: $vgpr0 |
| ; GFX9-NEXT: {{ $}} |
| ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX9-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s16), addrspace 5) |
| ; GFX9-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX10-LABEL: name: test_load_private_s16_align2 |
| ; GFX10: liveins: $vgpr0 |
| ; GFX10-NEXT: {{ $}} |
| ; GFX10-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX10-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s16), addrspace 5) |
| ; GFX10-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX11-LABEL: name: test_load_private_s16_align2 |
| ; GFX11: liveins: $vgpr0 |
| ; GFX11-NEXT: {{ $}} |
| ; GFX11-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX11-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s16), addrspace 5) |
| ; GFX11-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| %0:_(p5) = COPY $vgpr0 |
| %1:_(s16) = G_LOAD %0 :: (load (s16), align 2, addrspace 5) |
| %2:_(s32) = G_ANYEXT %1 |
| $vgpr0 = COPY %2 |
| ... |
| |
| --- |
| name: test_load_private_s16_align1 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_private_s16_align1 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; SI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; SI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; SI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s8) from unknown-address + 1, addrspace 5) |
| ; 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_private_s16_align1 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; CI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; CI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; CI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s8) from unknown-address + 1, addrspace 5) |
| ; 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) |
| ; |
| ; VI-LABEL: name: test_load_private_s16_align1 |
| ; VI: liveins: $vgpr0 |
| ; VI-NEXT: {{ $}} |
| ; VI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; VI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; VI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; VI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; VI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s8) from unknown-address + 1, addrspace 5) |
| ; 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_private_s16_align1 |
| ; GFX9: liveins: $vgpr0 |
| ; GFX9-NEXT: {{ $}} |
| ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX9-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; GFX9-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; GFX9-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX9-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s8) from unknown-address + 1, addrspace 5) |
| ; 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) |
| ; |
| ; GFX10-LABEL: name: test_load_private_s16_align1 |
| ; GFX10: liveins: $vgpr0 |
| ; GFX10-NEXT: {{ $}} |
| ; GFX10-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX10-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; GFX10-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; GFX10-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX10-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s8) from unknown-address + 1, addrspace 5) |
| ; 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) |
| ; |
| ; GFX11-LABEL: name: test_load_private_s16_align1 |
| ; GFX11: liveins: $vgpr0 |
| ; GFX11-NEXT: {{ $}} |
| ; GFX11-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX11-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s16), align 1, addrspace 5) |
| ; GFX11-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| %0:_(p5) = COPY $vgpr0 |
| %1:_(s16) = G_LOAD %0 :: (load (s16), align 1, addrspace 5) |
| %2:_(s32) = G_ANYEXT %1 |
| $vgpr0 = COPY %2 |
| ... |
| |
| --- |
| name: test_load_private_s32_align4 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_private_s32_align4 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), addrspace 5) |
| ; SI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; CI-LABEL: name: test_load_private_s32_align4 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), addrspace 5) |
| ; CI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; VI-LABEL: name: test_load_private_s32_align4 |
| ; VI: liveins: $vgpr0 |
| ; VI-NEXT: {{ $}} |
| ; VI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; VI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), addrspace 5) |
| ; VI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX9-LABEL: name: test_load_private_s32_align4 |
| ; GFX9: liveins: $vgpr0 |
| ; GFX9-NEXT: {{ $}} |
| ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX9-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), addrspace 5) |
| ; GFX9-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX10-LABEL: name: test_load_private_s32_align4 |
| ; GFX10: liveins: $vgpr0 |
| ; GFX10-NEXT: {{ $}} |
| ; GFX10-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX10-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), addrspace 5) |
| ; GFX10-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX11-LABEL: name: test_load_private_s32_align4 |
| ; GFX11: liveins: $vgpr0 |
| ; GFX11-NEXT: {{ $}} |
| ; GFX11-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX11-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), addrspace 5) |
| ; GFX11-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| %0:_(p5) = COPY $vgpr0 |
| %1:_(s32) = G_LOAD %0 :: (load (s32), align 4, addrspace 5) |
| $vgpr0 = COPY %1 |
| ... |
| |
| --- |
| name: test_load_private_s32_align2 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_private_s32_align2 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; SI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s16), addrspace 5) |
| ; SI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; SI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s16) from unknown-address + 2, addrspace 5) |
| ; 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_private_s32_align2 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; CI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s16), addrspace 5) |
| ; CI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; CI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s16) from unknown-address + 2, addrspace 5) |
| ; 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) |
| ; |
| ; VI-LABEL: name: test_load_private_s32_align2 |
| ; VI: liveins: $vgpr0 |
| ; VI-NEXT: {{ $}} |
| ; VI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; VI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s16), addrspace 5) |
| ; VI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; VI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; VI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s16) from unknown-address + 2, addrspace 5) |
| ; 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_private_s32_align2 |
| ; GFX9: liveins: $vgpr0 |
| ; GFX9-NEXT: {{ $}} |
| ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX9-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s16), addrspace 5) |
| ; GFX9-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; GFX9-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX9-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s16) from unknown-address + 2, addrspace 5) |
| ; 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) |
| ; |
| ; GFX10-LABEL: name: test_load_private_s32_align2 |
| ; GFX10: liveins: $vgpr0 |
| ; GFX10-NEXT: {{ $}} |
| ; GFX10-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX10-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s16), addrspace 5) |
| ; GFX10-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; GFX10-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX10-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s16) from unknown-address + 2, addrspace 5) |
| ; 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) |
| ; |
| ; GFX11-LABEL: name: test_load_private_s32_align2 |
| ; GFX11: liveins: $vgpr0 |
| ; GFX11-NEXT: {{ $}} |
| ; GFX11-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX11-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), align 2, addrspace 5) |
| ; GFX11-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| %0:_(p5) = COPY $vgpr0 |
| %1:_(s32) = G_LOAD %0 :: (load (s32), align 2, addrspace 5) |
| $vgpr0 = COPY %1 |
| ... |
| |
| --- |
| name: test_load_private_s32_align1 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_private_s32_align1 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; SI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; SI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; SI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; SI-NEXT: [[ZEXTLOAD1:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD]](p5) :: (load (s8) from unknown-address + 1, addrspace 5) |
| ; 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]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C2]](s32) |
| ; SI-NEXT: [[ZEXTLOAD2:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD1]](p5) :: (load (s8) from unknown-address + 2, addrspace 5) |
| ; SI-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p5) = G_PTR_ADD [[PTR_ADD1]], [[C]](s32) |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD2]](p5) :: (load (s8) from unknown-address + 3, addrspace 5) |
| ; 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_private_s32_align1 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; CI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; CI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; CI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; CI-NEXT: [[ZEXTLOAD1:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD]](p5) :: (load (s8) from unknown-address + 1, addrspace 5) |
| ; 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]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C2]](s32) |
| ; CI-NEXT: [[ZEXTLOAD2:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD1]](p5) :: (load (s8) from unknown-address + 2, addrspace 5) |
| ; CI-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p5) = G_PTR_ADD [[PTR_ADD1]], [[C]](s32) |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD2]](p5) :: (load (s8) from unknown-address + 3, addrspace 5) |
| ; 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) |
| ; |
| ; VI-LABEL: name: test_load_private_s32_align1 |
| ; VI: liveins: $vgpr0 |
| ; VI-NEXT: {{ $}} |
| ; VI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; VI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; VI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; VI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; VI-NEXT: [[ZEXTLOAD1:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD]](p5) :: (load (s8) from unknown-address + 1, addrspace 5) |
| ; 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]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C2]](s32) |
| ; VI-NEXT: [[ZEXTLOAD2:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD1]](p5) :: (load (s8) from unknown-address + 2, addrspace 5) |
| ; VI-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p5) = G_PTR_ADD [[PTR_ADD1]], [[C]](s32) |
| ; VI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD2]](p5) :: (load (s8) from unknown-address + 3, addrspace 5) |
| ; 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_private_s32_align1 |
| ; GFX9: liveins: $vgpr0 |
| ; GFX9-NEXT: {{ $}} |
| ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX9-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; GFX9-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; GFX9-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX9-NEXT: [[ZEXTLOAD1:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD]](p5) :: (load (s8) from unknown-address + 1, addrspace 5) |
| ; 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]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C2]](s32) |
| ; GFX9-NEXT: [[ZEXTLOAD2:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD1]](p5) :: (load (s8) from unknown-address + 2, addrspace 5) |
| ; GFX9-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p5) = G_PTR_ADD [[PTR_ADD1]], [[C]](s32) |
| ; GFX9-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD2]](p5) :: (load (s8) from unknown-address + 3, addrspace 5) |
| ; 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) |
| ; |
| ; GFX10-LABEL: name: test_load_private_s32_align1 |
| ; GFX10: liveins: $vgpr0 |
| ; GFX10-NEXT: {{ $}} |
| ; GFX10-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX10-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; GFX10-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; GFX10-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX10-NEXT: [[ZEXTLOAD1:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD]](p5) :: (load (s8) from unknown-address + 1, addrspace 5) |
| ; 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]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C2]](s32) |
| ; GFX10-NEXT: [[ZEXTLOAD2:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD1]](p5) :: (load (s8) from unknown-address + 2, addrspace 5) |
| ; GFX10-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p5) = G_PTR_ADD [[PTR_ADD1]], [[C]](s32) |
| ; GFX10-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD2]](p5) :: (load (s8) from unknown-address + 3, addrspace 5) |
| ; 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) |
| ; |
| ; GFX11-LABEL: name: test_load_private_s32_align1 |
| ; GFX11: liveins: $vgpr0 |
| ; GFX11-NEXT: {{ $}} |
| ; GFX11-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX11-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), align 1, addrspace 5) |
| ; GFX11-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| %0:_(p5) = COPY $vgpr0 |
| %1:_(s32) = G_LOAD %0 :: (load (s32), align 1, addrspace 5) |
| $vgpr0 = COPY %1 |
| ... |
| |
| --- |
| name: test_load_private_s24_align8 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_private_s24_align8 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), align 8, addrspace 5) |
| ; SI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; CI-LABEL: name: test_load_private_s24_align8 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), align 8, addrspace 5) |
| ; CI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; VI-LABEL: name: test_load_private_s24_align8 |
| ; VI: liveins: $vgpr0 |
| ; VI-NEXT: {{ $}} |
| ; VI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; VI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), align 8, addrspace 5) |
| ; VI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX9-LABEL: name: test_load_private_s24_align8 |
| ; GFX9: liveins: $vgpr0 |
| ; GFX9-NEXT: {{ $}} |
| ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX9-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), align 8, addrspace 5) |
| ; GFX9-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX10-LABEL: name: test_load_private_s24_align8 |
| ; GFX10: liveins: $vgpr0 |
| ; GFX10-NEXT: {{ $}} |
| ; GFX10-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX10-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), align 8, addrspace 5) |
| ; GFX10-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX11-LABEL: name: test_load_private_s24_align8 |
| ; GFX11: liveins: $vgpr0 |
| ; GFX11-NEXT: {{ $}} |
| ; GFX11-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX11-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), align 8, addrspace 5) |
| ; GFX11-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| %0:_(p5) = COPY $vgpr0 |
| %1:_(s24) = G_LOAD %0 :: (load (s24), align 8, addrspace 5) |
| %2:_(s32) = G_ANYEXT %1 |
| $vgpr0 = COPY %2 |
| ... |
| |
| --- |
| name: test_load_private_s24_align4 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_private_s24_align4 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), addrspace 5) |
| ; SI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; CI-LABEL: name: test_load_private_s24_align4 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), addrspace 5) |
| ; CI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; VI-LABEL: name: test_load_private_s24_align4 |
| ; VI: liveins: $vgpr0 |
| ; VI-NEXT: {{ $}} |
| ; VI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; VI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), addrspace 5) |
| ; VI-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX9-LABEL: name: test_load_private_s24_align4 |
| ; GFX9: liveins: $vgpr0 |
| ; GFX9-NEXT: {{ $}} |
| ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX9-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), addrspace 5) |
| ; GFX9-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX10-LABEL: name: test_load_private_s24_align4 |
| ; GFX10: liveins: $vgpr0 |
| ; GFX10-NEXT: {{ $}} |
| ; GFX10-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX10-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), addrspace 5) |
| ; GFX10-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| ; |
| ; GFX11-LABEL: name: test_load_private_s24_align4 |
| ; GFX11: liveins: $vgpr0 |
| ; GFX11-NEXT: {{ $}} |
| ; GFX11-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX11-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), addrspace 5) |
| ; GFX11-NEXT: $vgpr0 = COPY [[LOAD]](s32) |
| %0:_(p5) = COPY $vgpr0 |
| %1:_(s24) = G_LOAD %0 :: (load (s24), align 4, addrspace 5) |
| %2:_(s32) = G_ANYEXT %1 |
| $vgpr0 = COPY %2 |
| ... |
| |
| --- |
| name: test_load_private_s24_align2 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_private_s24_align2 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; SI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s16), addrspace 5) |
| ; SI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; SI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s8) from unknown-address + 2, align 2, addrspace 5) |
| ; 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_private_s24_align2 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; CI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s16), addrspace 5) |
| ; CI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; CI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s8) from unknown-address + 2, align 2, addrspace 5) |
| ; 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) |
| ; |
| ; VI-LABEL: name: test_load_private_s24_align2 |
| ; VI: liveins: $vgpr0 |
| ; VI-NEXT: {{ $}} |
| ; VI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; VI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s16), addrspace 5) |
| ; VI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; VI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; VI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s8) from unknown-address + 2, align 2, addrspace 5) |
| ; 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_private_s24_align2 |
| ; GFX9: liveins: $vgpr0 |
| ; GFX9-NEXT: {{ $}} |
| ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX9-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s16), addrspace 5) |
| ; GFX9-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; GFX9-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX9-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s8) from unknown-address + 2, align 2, addrspace 5) |
| ; 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) |
| ; |
| ; GFX10-LABEL: name: test_load_private_s24_align2 |
| ; GFX10: liveins: $vgpr0 |
| ; GFX10-NEXT: {{ $}} |
| ; GFX10-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX10-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s16), addrspace 5) |
| ; GFX10-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; GFX10-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX10-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s8) from unknown-address + 2, align 2, addrspace 5) |
| ; 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) |
| ; |
| ; GFX11-LABEL: name: test_load_private_s24_align2 |
| ; GFX11: liveins: $vgpr0 |
| ; GFX11-NEXT: {{ $}} |
| ; GFX11-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX11-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s16), addrspace 5) |
| ; GFX11-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; GFX11-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX11-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s8) from unknown-address + 2, align 2, addrspace 5) |
| ; 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) |
| %0:_(p5) = COPY $vgpr0 |
| %1:_(s24) = G_LOAD %0 :: (load (s24), align 2, addrspace 5) |
| %2:_(s32) = G_ANYEXT %1 |
| $vgpr0 = COPY %2 |
| ... |
| |
| --- |
| name: test_load_private_s24_align1 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_private_s24_align1 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; SI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; SI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; SI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; SI-NEXT: [[ZEXTLOAD1:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD]](p5) :: (load (s8) from unknown-address + 1, addrspace 5) |
| ; 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]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C2]](s32) |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD1]](p5) :: (load (s8) from unknown-address + 2, addrspace 5) |
| ; 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_private_s24_align1 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; CI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; CI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; CI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; CI-NEXT: [[ZEXTLOAD1:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD]](p5) :: (load (s8) from unknown-address + 1, addrspace 5) |
| ; 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]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C2]](s32) |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD1]](p5) :: (load (s8) from unknown-address + 2, addrspace 5) |
| ; 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) |
| ; |
| ; VI-LABEL: name: test_load_private_s24_align1 |
| ; VI: liveins: $vgpr0 |
| ; VI-NEXT: {{ $}} |
| ; VI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; VI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; VI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; VI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; VI-NEXT: [[ZEXTLOAD1:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD]](p5) :: (load (s8) from unknown-address + 1, addrspace 5) |
| ; 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]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C2]](s32) |
| ; VI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD1]](p5) :: (load (s8) from unknown-address + 2, addrspace 5) |
| ; 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_private_s24_align1 |
| ; GFX9: liveins: $vgpr0 |
| ; GFX9-NEXT: {{ $}} |
| ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX9-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; GFX9-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; GFX9-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX9-NEXT: [[ZEXTLOAD1:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD]](p5) :: (load (s8) from unknown-address + 1, addrspace 5) |
| ; 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]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C2]](s32) |
| ; GFX9-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD1]](p5) :: (load (s8) from unknown-address + 2, addrspace 5) |
| ; 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) |
| ; |
| ; GFX10-LABEL: name: test_load_private_s24_align1 |
| ; GFX10: liveins: $vgpr0 |
| ; GFX10-NEXT: {{ $}} |
| ; GFX10-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX10-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; GFX10-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; GFX10-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX10-NEXT: [[ZEXTLOAD1:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD]](p5) :: (load (s8) from unknown-address + 1, addrspace 5) |
| ; 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]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C2]](s32) |
| ; GFX10-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD1]](p5) :: (load (s8) from unknown-address + 2, addrspace 5) |
| ; 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) |
| ; |
| ; GFX11-LABEL: name: test_load_private_s24_align1 |
| ; GFX11: liveins: $vgpr0 |
| ; GFX11-NEXT: {{ $}} |
| ; GFX11-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX11-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s16), align 1, addrspace 5) |
| ; GFX11-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; GFX11-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX11-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s8) from unknown-address + 2, addrspace 5) |
| ; 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) |
| %0:_(p5) = COPY $vgpr0 |
| %1:_(s24) = G_LOAD %0 :: (load (s24), align 1, addrspace 5) |
| %2:_(s32) = G_ANYEXT %1 |
| $vgpr0 = COPY %2 |
| ... |
| |
| --- |
| name: test_load_private_s48_align8 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_private_s48_align8 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), align 8, addrspace 5) |
| ; SI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 4 |
| ; SI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; SI-NEXT: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s16) from unknown-address + 4, align 4, addrspace 5) |
| ; SI-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; SI-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[LOAD]], [[C1]](s32) |
| ; SI-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535 |
| ; SI-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[LOAD]], [[C2]] |
| ; SI-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[LSHR]], [[C1]](s32) |
| ; SI-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]] |
| ; SI-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[LOAD1]], [[C2]] |
| ; SI-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 |
| ; SI-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[C3]], [[C1]](s32) |
| ; SI-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[AND1]], [[SHL1]] |
| ; SI-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[OR]](s32), [[OR1]](s32) |
| ; SI-NEXT: $vgpr0_vgpr1 = COPY [[MV]](s64) |
| ; |
| ; CI-LABEL: name: test_load_private_s48_align8 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), align 8, addrspace 5) |
| ; CI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 4 |
| ; CI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; CI-NEXT: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s16) from unknown-address + 4, align 4, addrspace 5) |
| ; CI-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; CI-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[LOAD]], [[C1]](s32) |
| ; CI-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535 |
| ; CI-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[LOAD]], [[C2]] |
| ; CI-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[LSHR]], [[C1]](s32) |
| ; CI-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]] |
| ; CI-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[LOAD1]], [[C2]] |
| ; CI-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 |
| ; CI-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[C3]], [[C1]](s32) |
| ; CI-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[AND1]], [[SHL1]] |
| ; CI-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[OR]](s32), [[OR1]](s32) |
| ; CI-NEXT: $vgpr0_vgpr1 = COPY [[MV]](s64) |
| ; |
| ; VI-LABEL: name: test_load_private_s48_align8 |
| ; VI: liveins: $vgpr0 |
| ; VI-NEXT: {{ $}} |
| ; VI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; VI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), align 8, addrspace 5) |
| ; VI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 4 |
| ; VI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; VI-NEXT: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s16) from unknown-address + 4, align 4, addrspace 5) |
| ; VI-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; VI-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[LOAD]], [[C1]](s32) |
| ; VI-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535 |
| ; VI-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[LOAD]], [[C2]] |
| ; VI-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[LSHR]], [[C1]](s32) |
| ; VI-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]] |
| ; VI-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[LOAD1]], [[C2]] |
| ; VI-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 |
| ; VI-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[C3]], [[C1]](s32) |
| ; VI-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[AND1]], [[SHL1]] |
| ; VI-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[OR]](s32), [[OR1]](s32) |
| ; VI-NEXT: $vgpr0_vgpr1 = COPY [[MV]](s64) |
| ; |
| ; GFX9-LABEL: name: test_load_private_s48_align8 |
| ; GFX9: liveins: $vgpr0 |
| ; GFX9-NEXT: {{ $}} |
| ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX9-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), align 8, addrspace 5) |
| ; GFX9-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 4 |
| ; GFX9-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX9-NEXT: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s16) from unknown-address + 4, align 4, addrspace 5) |
| ; GFX9-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; GFX9-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[LOAD]], [[C1]](s32) |
| ; GFX9-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535 |
| ; GFX9-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[LOAD]], [[C2]] |
| ; GFX9-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[LSHR]], [[C1]](s32) |
| ; GFX9-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]] |
| ; GFX9-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[LOAD1]], [[C2]] |
| ; GFX9-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 |
| ; GFX9-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[C3]], [[C1]](s32) |
| ; GFX9-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[AND1]], [[SHL1]] |
| ; GFX9-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[OR]](s32), [[OR1]](s32) |
| ; GFX9-NEXT: $vgpr0_vgpr1 = COPY [[MV]](s64) |
| ; |
| ; GFX10-LABEL: name: test_load_private_s48_align8 |
| ; GFX10: liveins: $vgpr0 |
| ; GFX10-NEXT: {{ $}} |
| ; GFX10-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX10-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), align 8, addrspace 5) |
| ; GFX10-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 4 |
| ; GFX10-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX10-NEXT: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s16) from unknown-address + 4, align 4, addrspace 5) |
| ; GFX10-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| ; GFX10-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[LOAD]], [[C1]](s32) |
| ; GFX10-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535 |
| ; GFX10-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[LOAD]], [[C2]] |
| ; GFX10-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[LSHR]], [[C1]](s32) |
| ; GFX10-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]] |
| ; GFX10-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[LOAD1]], [[C2]] |
| ; GFX10-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 |
| ; GFX10-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[C3]], [[C1]](s32) |
| ; GFX10-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[AND1]], [[SHL1]] |
| ; GFX10-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[OR]](s32), [[OR1]](s32) |
| ; GFX10-NEXT: $vgpr0_vgpr1 = COPY [[MV]](s64) |
| ; |
| ; GFX11-LABEL: name: test_load_private_s48_align8 |
| ; GFX11: liveins: $vgpr0 |
| ; GFX11-NEXT: {{ $}} |
| ; GFX11-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX11-NEXT: [[LOAD:%[0-9]+]]:_(s64) = G_LOAD [[COPY]](p5) :: (load (s64), addrspace 5) |
| ; GFX11-NEXT: $vgpr0_vgpr1 = COPY [[LOAD]](s64) |
| %0:_(p5) = COPY $vgpr0 |
| %1:_(s48) = G_LOAD %0 :: (load (s48), align 8, addrspace 5) |
| %2:_(s64) = G_ANYEXT %1 |
| $vgpr0_vgpr1 = COPY %2 |
| ... |
| |
| --- |
| name: test_load_private_s64_align8 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_private_s64_align8 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), align 8, addrspace 5) |
| ; SI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 4 |
| ; SI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; SI-NEXT: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s32) from unknown-address + 4, addrspace 5) |
| ; SI-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[LOAD]](s32), [[LOAD1]](s32) |
| ; SI-NEXT: $vgpr0_vgpr1 = COPY [[MV]](s64) |
| ; |
| ; CI-LABEL: name: test_load_private_s64_align8 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), align 8, addrspace 5) |
| ; CI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 4 |
| ; CI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; CI-NEXT: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s32) from unknown-address + 4, addrspace 5) |
| ; CI-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[LOAD]](s32), [[LOAD1]](s32) |
| ; CI-NEXT: $vgpr0_vgpr1 = COPY [[MV]](s64) |
| ; |
| ; VI-LABEL: name: test_load_private_s64_align8 |
| ; VI: liveins: $vgpr0 |
| ; VI-NEXT: {{ $}} |
| ; VI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; VI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), align 8, addrspace 5) |
| ; VI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 4 |
| ; VI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; VI-NEXT: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s32) from unknown-address + 4, addrspace 5) |
| ; VI-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[LOAD]](s32), [[LOAD1]](s32) |
| ; VI-NEXT: $vgpr0_vgpr1 = COPY [[MV]](s64) |
| ; |
| ; GFX9-LABEL: name: test_load_private_s64_align8 |
| ; GFX9: liveins: $vgpr0 |
| ; GFX9-NEXT: {{ $}} |
| ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX9-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), align 8, addrspace 5) |
| ; GFX9-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 4 |
| ; GFX9-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX9-NEXT: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s32) from unknown-address + 4, addrspace 5) |
| ; GFX9-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[LOAD]](s32), [[LOAD1]](s32) |
| ; GFX9-NEXT: $vgpr0_vgpr1 = COPY [[MV]](s64) |
| ; |
| ; GFX10-LABEL: name: test_load_private_s64_align8 |
| ; GFX10: liveins: $vgpr0 |
| ; GFX10-NEXT: {{ $}} |
| ; GFX10-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX10-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), align 8, addrspace 5) |
| ; GFX10-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 4 |
| ; GFX10-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX10-NEXT: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s32) from unknown-address + 4, addrspace 5) |
| ; GFX10-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[LOAD]](s32), [[LOAD1]](s32) |
| ; GFX10-NEXT: $vgpr0_vgpr1 = COPY [[MV]](s64) |
| ; |
| ; GFX11-LABEL: name: test_load_private_s64_align8 |
| ; GFX11: liveins: $vgpr0 |
| ; GFX11-NEXT: {{ $}} |
| ; GFX11-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX11-NEXT: [[LOAD:%[0-9]+]]:_(s64) = G_LOAD [[COPY]](p5) :: (load (s64), addrspace 5) |
| ; GFX11-NEXT: $vgpr0_vgpr1 = COPY [[LOAD]](s64) |
| %0:_(p5) = COPY $vgpr0 |
| %1:_(s64) = G_LOAD %0 :: (load (s64), align 8, addrspace 5) |
| $vgpr0_vgpr1 = COPY %1 |
| ... |
| |
| --- |
| name: test_load_private_s64_align4 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_private_s64_align4 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), addrspace 5) |
| ; SI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 4 |
| ; SI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; SI-NEXT: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s32) from unknown-address + 4, addrspace 5) |
| ; SI-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[LOAD]](s32), [[LOAD1]](s32) |
| ; SI-NEXT: $vgpr0_vgpr1 = COPY [[MV]](s64) |
| ; |
| ; CI-LABEL: name: test_load_private_s64_align4 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), addrspace 5) |
| ; CI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 4 |
| ; CI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; CI-NEXT: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s32) from unknown-address + 4, addrspace 5) |
| ; CI-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[LOAD]](s32), [[LOAD1]](s32) |
| ; CI-NEXT: $vgpr0_vgpr1 = COPY [[MV]](s64) |
| ; |
| ; VI-LABEL: name: test_load_private_s64_align4 |
| ; VI: liveins: $vgpr0 |
| ; VI-NEXT: {{ $}} |
| ; VI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; VI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), addrspace 5) |
| ; VI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 4 |
| ; VI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; VI-NEXT: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s32) from unknown-address + 4, addrspace 5) |
| ; VI-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[LOAD]](s32), [[LOAD1]](s32) |
| ; VI-NEXT: $vgpr0_vgpr1 = COPY [[MV]](s64) |
| ; |
| ; GFX9-LABEL: name: test_load_private_s64_align4 |
| ; GFX9: liveins: $vgpr0 |
| ; GFX9-NEXT: {{ $}} |
| ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX9-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), addrspace 5) |
| ; GFX9-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 4 |
| ; GFX9-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX9-NEXT: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s32) from unknown-address + 4, addrspace 5) |
| ; GFX9-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[LOAD]](s32), [[LOAD1]](s32) |
| ; GFX9-NEXT: $vgpr0_vgpr1 = COPY [[MV]](s64) |
| ; |
| ; GFX10-LABEL: name: test_load_private_s64_align4 |
| ; GFX10: liveins: $vgpr0 |
| ; GFX10-NEXT: {{ $}} |
| ; GFX10-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX10-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p5) :: (load (s32), addrspace 5) |
| ; GFX10-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 4 |
| ; GFX10-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX10-NEXT: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s32) from unknown-address + 4, addrspace 5) |
| ; GFX10-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[LOAD]](s32), [[LOAD1]](s32) |
| ; GFX10-NEXT: $vgpr0_vgpr1 = COPY [[MV]](s64) |
| ; |
| ; GFX11-LABEL: name: test_load_private_s64_align4 |
| ; GFX11: liveins: $vgpr0 |
| ; GFX11-NEXT: {{ $}} |
| ; GFX11-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX11-NEXT: [[LOAD:%[0-9]+]]:_(s64) = G_LOAD [[COPY]](p5) :: (load (s64), align 4, addrspace 5) |
| ; GFX11-NEXT: $vgpr0_vgpr1 = COPY [[LOAD]](s64) |
| %0:_(p5) = COPY $vgpr0 |
| %1:_(s64) = G_LOAD %0 :: (load (s64), align 4, addrspace 5) |
| $vgpr0_vgpr1 = COPY %1 |
| ... |
| |
| --- |
| name: test_load_private_s64_align2 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_private_s64_align2 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; SI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s16), addrspace 5) |
| ; SI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; SI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s16) from unknown-address + 2, addrspace 5) |
| ; 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: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 4 |
| ; SI-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C2]](s32) |
| ; SI-NEXT: [[ZEXTLOAD1:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD1]](p5) :: (load (s16) from unknown-address + 4, addrspace 5) |
| ; SI-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p5) = G_PTR_ADD [[PTR_ADD1]], [[C]](s32) |
| ; SI-NEXT: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD2]](p5) :: (load (s16) from unknown-address + 6, addrspace 5) |
| ; SI-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[LOAD1]], [[C1]](s32) |
| ; SI-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[SHL1]], [[ZEXTLOAD1]] |
| ; SI-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[OR]](s32), [[OR1]](s32) |
| ; SI-NEXT: $vgpr0_vgpr1 = COPY [[MV]](s64) |
| ; |
| ; CI-LABEL: name: test_load_private_s64_align2 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; CI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s16), addrspace 5) |
| ; CI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; CI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s16) from unknown-address + 2, addrspace 5) |
| ; 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: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 4 |
| ; CI-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C2]](s32) |
| ; CI-NEXT: [[ZEXTLOAD1:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD1]](p5) :: (load (s16) from unknown-address + 4, addrspace 5) |
| ; CI-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p5) = G_PTR_ADD [[PTR_ADD1]], [[C]](s32) |
| ; CI-NEXT: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD2]](p5) :: (load (s16) from unknown-address + 6, addrspace 5) |
| ; CI-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[LOAD1]], [[C1]](s32) |
| ; CI-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[SHL1]], [[ZEXTLOAD1]] |
| ; CI-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[OR]](s32), [[OR1]](s32) |
| ; CI-NEXT: $vgpr0_vgpr1 = COPY [[MV]](s64) |
| ; |
| ; VI-LABEL: name: test_load_private_s64_align2 |
| ; VI: liveins: $vgpr0 |
| ; VI-NEXT: {{ $}} |
| ; VI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; VI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s16), addrspace 5) |
| ; VI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; VI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; VI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s16) from unknown-address + 2, addrspace 5) |
| ; 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: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 4 |
| ; VI-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C2]](s32) |
| ; VI-NEXT: [[ZEXTLOAD1:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD1]](p5) :: (load (s16) from unknown-address + 4, addrspace 5) |
| ; VI-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p5) = G_PTR_ADD [[PTR_ADD1]], [[C]](s32) |
| ; VI-NEXT: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD2]](p5) :: (load (s16) from unknown-address + 6, addrspace 5) |
| ; VI-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[LOAD1]], [[C1]](s32) |
| ; VI-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[SHL1]], [[ZEXTLOAD1]] |
| ; VI-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[OR]](s32), [[OR1]](s32) |
| ; VI-NEXT: $vgpr0_vgpr1 = COPY [[MV]](s64) |
| ; |
| ; GFX9-LABEL: name: test_load_private_s64_align2 |
| ; GFX9: liveins: $vgpr0 |
| ; GFX9-NEXT: {{ $}} |
| ; GFX9-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX9-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s16), addrspace 5) |
| ; GFX9-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; GFX9-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX9-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s16) from unknown-address + 2, addrspace 5) |
| ; 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: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 4 |
| ; GFX9-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C2]](s32) |
| ; GFX9-NEXT: [[ZEXTLOAD1:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD1]](p5) :: (load (s16) from unknown-address + 4, addrspace 5) |
| ; GFX9-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p5) = G_PTR_ADD [[PTR_ADD1]], [[C]](s32) |
| ; GFX9-NEXT: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD2]](p5) :: (load (s16) from unknown-address + 6, addrspace 5) |
| ; GFX9-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[LOAD1]], [[C1]](s32) |
| ; GFX9-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[SHL1]], [[ZEXTLOAD1]] |
| ; GFX9-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[OR]](s32), [[OR1]](s32) |
| ; GFX9-NEXT: $vgpr0_vgpr1 = COPY [[MV]](s64) |
| ; |
| ; GFX10-LABEL: name: test_load_private_s64_align2 |
| ; GFX10: liveins: $vgpr0 |
| ; GFX10-NEXT: {{ $}} |
| ; GFX10-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX10-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s16), addrspace 5) |
| ; GFX10-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2 |
| ; GFX10-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; GFX10-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD]](p5) :: (load (s16) from unknown-address + 2, addrspace 5) |
| ; 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: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 4 |
| ; GFX10-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C2]](s32) |
| ; GFX10-NEXT: [[ZEXTLOAD1:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD1]](p5) :: (load (s16) from unknown-address + 4, addrspace 5) |
| ; GFX10-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p5) = G_PTR_ADD [[PTR_ADD1]], [[C]](s32) |
| ; GFX10-NEXT: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD2]](p5) :: (load (s16) from unknown-address + 6, addrspace 5) |
| ; GFX10-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[LOAD1]], [[C1]](s32) |
| ; GFX10-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[SHL1]], [[ZEXTLOAD1]] |
| ; GFX10-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[OR]](s32), [[OR1]](s32) |
| ; GFX10-NEXT: $vgpr0_vgpr1 = COPY [[MV]](s64) |
| ; |
| ; GFX11-LABEL: name: test_load_private_s64_align2 |
| ; GFX11: liveins: $vgpr0 |
| ; GFX11-NEXT: {{ $}} |
| ; GFX11-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; GFX11-NEXT: [[LOAD:%[0-9]+]]:_(s64) = G_LOAD [[COPY]](p5) :: (load (s64), align 2, addrspace 5) |
| ; GFX11-NEXT: $vgpr0_vgpr1 = COPY [[LOAD]](s64) |
| %0:_(p5) = COPY $vgpr0 |
| %1:_(s64) = G_LOAD %0 :: (load (s64), align 2, addrspace 5) |
| $vgpr0_vgpr1 = COPY %1 |
| ... |
| |
| --- |
| name: test_load_private_s64_align1 |
| body: | |
| bb.0: |
| liveins: $vgpr0 |
| |
| ; SI-LABEL: name: test_load_private_s64_align1 |
| ; SI: liveins: $vgpr0 |
| ; SI-NEXT: {{ $}} |
| ; SI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; SI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; SI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; SI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; SI-NEXT: [[ZEXTLOAD1:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD]](p5) :: (load (s8) from unknown-address + 1, addrspace 5) |
| ; 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]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C2]](s32) |
| ; SI-NEXT: [[ZEXTLOAD2:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD1]](p5) :: (load (s8) from unknown-address + 2, addrspace 5) |
| ; SI-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p5) = G_PTR_ADD [[PTR_ADD1]], [[C]](s32) |
| ; SI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD2]](p5) :: (load (s8) from unknown-address + 3, addrspace 5) |
| ; 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: [[C4:%[0-9]+]]:_(s32) = G_CONSTANT i32 4 |
| ; SI-NEXT: [[PTR_ADD3:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C4]](s32) |
| ; SI-NEXT: [[ZEXTLOAD3:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD3]](p5) :: (load (s8) from unknown-address + 4, addrspace 5) |
| ; SI-NEXT: [[PTR_ADD4:%[0-9]+]]:_(p5) = G_PTR_ADD [[PTR_ADD3]], [[C]](s32) |
| ; SI-NEXT: [[ZEXTLOAD4:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD4]](p5) :: (load (s8) from unknown-address + 5, addrspace 5) |
| ; SI-NEXT: [[SHL3:%[0-9]+]]:_(s32) = G_SHL [[ZEXTLOAD4]], [[C1]](s32) |
| ; SI-NEXT: [[OR3:%[0-9]+]]:_(s32) = G_OR [[SHL3]], [[ZEXTLOAD3]] |
| ; SI-NEXT: [[PTR_ADD5:%[0-9]+]]:_(p5) = G_PTR_ADD [[PTR_ADD3]], [[C2]](s32) |
| ; SI-NEXT: [[ZEXTLOAD5:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD5]](p5) :: (load (s8) from unknown-address + 6, addrspace 5) |
| ; SI-NEXT: [[PTR_ADD6:%[0-9]+]]:_(p5) = G_PTR_ADD [[PTR_ADD5]], [[C]](s32) |
| ; SI-NEXT: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD6]](p5) :: (load (s8) from unknown-address + 7, addrspace 5) |
| ; SI-NEXT: [[SHL4:%[0-9]+]]:_(s32) = G_SHL [[LOAD1]], [[C1]](s32) |
| ; SI-NEXT: [[OR4:%[0-9]+]]:_(s32) = G_OR [[SHL4]], [[ZEXTLOAD5]] |
| ; SI-NEXT: [[SHL5:%[0-9]+]]:_(s32) = G_SHL [[OR4]], [[C3]](s32) |
| ; SI-NEXT: [[OR5:%[0-9]+]]:_(s32) = G_OR [[SHL5]], [[OR3]] |
| ; SI-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[OR2]](s32), [[OR5]](s32) |
| ; SI-NEXT: $vgpr0_vgpr1 = COPY [[MV]](s64) |
| ; |
| ; CI-LABEL: name: test_load_private_s64_align1 |
| ; CI: liveins: $vgpr0 |
| ; CI-NEXT: {{ $}} |
| ; CI-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0 |
| ; CI-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p5) :: (load (s8), addrspace 5) |
| ; CI-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 |
| ; CI-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C]](s32) |
| ; CI-NEXT: [[ZEXTLOAD1:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD]](p5) :: (load (s8) from unknown-address + 1, addrspace 5) |
| ; 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]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C2]](s32) |
| ; CI-NEXT: [[ZEXTLOAD2:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD1]](p5) :: (load (s8) from unknown-address + 2, addrspace 5) |
| ; CI-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p5) = G_PTR_ADD [[PTR_ADD1]], [[C]](s32) |
| ; CI-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD2]](p5) :: (load (s8) from unknown-address + 3, addrspace 5) |
| ; 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: [[C4:%[0-9]+]]:_(s32) = G_CONSTANT i32 4 |
| ; CI-NEXT: [[PTR_ADD3:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C4]](s32) |
| ; CI-NEXT: [[ZEXTLOAD3:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD3]](p5) :: (load (s8) from unknown-address + 4, addrspace 5) |
| ; CI-NEXT: [[PTR_ADD4:%[0-9]+]]:_(p5) = G_PTR_ADD [[PTR_ADD3]], [[C]](s32) |
| ; CI-NEXT: [[ZEXTLOAD4:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD4]](p5) :: (load (s8) from unknown-address + 5, addrspace 5) |
| ; CI-NEXT: [[SHL3:%[0-9]+]]:_(s32) = G_SHL [[ZEXTLOAD4]], [[C1]](s32) |
| ; CI-NEXT: [[OR3:%[0-9]+]]:_(s32) = G_OR [[SHL3]], [[ZEXTLOAD3]] |
| ; CI-NEXT: [[PTR_ADD5:%[0-9]+]]:_(p5) = G_PTR_ADD [[PTR_ADD3]], [[C2]](s32) |
| ; CI-NEXT: [[ZEXTLOAD5:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[PTR_ADD5]](p5) :: (load (s8) from unknown-address + 6, addrspace 5) |
| ; CI-NEXT: [[PTR_ADD6:%[0-9]+]]:_(p5) = G_PTR_ADD [[PTR_ADD5]], [[C]](s32) |
| ; CI-NEXT: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD6]](p5) :: (load (s8) from unknown-address + 7, addrspace 5) |
| ; CI-NEXT: [[SHL4:%[0-9]+]]:_(s32) = G_SHL [[LOAD1]], [[C1]](s32) |
| ; CI-NEXT: [[OR4:%[0-9]+]]:_(s32) = G_OR [[SHL4]], [[ZEXTLOAD5]] |
| ; CI-NEXT: [[SHL5:%[0-9]+]]:_(s32) = G_SHL [[OR4]], [[C3]](s32) |
| ; CI-NEXT: [[OR5:%[0-9]+]]:_(s32) = G_OR [[SHL5]], [[OR3]] |
| |