1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=tahiti -run-pass=instruction-select -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX6 %s
3 # RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=hawaii -run-pass=instruction-select -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX7 %s
4 # RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=fiji -run-pass=instruction-select -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX7 %s
5 # RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -run-pass=instruction-select -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX9 %s
6 # RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1010 -run-pass=instruction-select -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX9 %s
9 name: zextload_local_s32_from_s8_align1
12 tracksRegLiveness: true
18 ; GFX6-LABEL: name: zextload_local_s32_from_s8_align1
19 ; GFX6: liveins: $vgpr0
21 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
22 ; GFX6-NEXT: [[DS_READ_U8_:%[0-9]+]]:vgpr_32 = DS_READ_U8 [[COPY]], 0, 0, implicit $m0, implicit $exec :: (load (s8), addrspace 3)
23 ; GFX6-NEXT: $vgpr0 = COPY [[DS_READ_U8_]]
24 ; GFX7-LABEL: name: zextload_local_s32_from_s8_align1
25 ; GFX7: liveins: $vgpr0
27 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
28 ; GFX7-NEXT: [[DS_READ_U8_:%[0-9]+]]:vgpr_32 = DS_READ_U8 [[COPY]], 0, 0, implicit $m0, implicit $exec :: (load (s8), addrspace 3)
29 ; GFX7-NEXT: $vgpr0 = COPY [[DS_READ_U8_]]
30 ; GFX9-LABEL: name: zextload_local_s32_from_s8_align1
31 ; GFX9: liveins: $vgpr0
33 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
34 ; GFX9-NEXT: [[DS_READ_U8_gfx9_:%[0-9]+]]:vgpr_32 = DS_READ_U8_gfx9 [[COPY]], 0, 0, implicit $exec :: (load (s8), addrspace 3)
35 ; GFX9-NEXT: $vgpr0 = COPY [[DS_READ_U8_gfx9_]]
36 %0:vgpr(p3) = COPY $vgpr0
37 %1:vgpr(s32) = G_ZEXTLOAD %0 :: (load (s8), align 1, addrspace 3)
43 name: zextload_local_s32_from_s16_align2
46 tracksRegLiveness: true
52 ; GFX6-LABEL: name: zextload_local_s32_from_s16_align2
53 ; GFX6: liveins: $vgpr0
55 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
56 ; GFX6-NEXT: [[DS_READ_U16_:%[0-9]+]]:vgpr_32 = DS_READ_U16 [[COPY]], 0, 0, implicit $m0, implicit $exec :: (load (s16), addrspace 3)
57 ; GFX6-NEXT: $vgpr0 = COPY [[DS_READ_U16_]]
58 ; GFX7-LABEL: name: zextload_local_s32_from_s16_align2
59 ; GFX7: liveins: $vgpr0
61 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
62 ; GFX7-NEXT: [[DS_READ_U16_:%[0-9]+]]:vgpr_32 = DS_READ_U16 [[COPY]], 0, 0, implicit $m0, implicit $exec :: (load (s16), addrspace 3)
63 ; GFX7-NEXT: $vgpr0 = COPY [[DS_READ_U16_]]
64 ; GFX9-LABEL: name: zextload_local_s32_from_s16_align2
65 ; GFX9: liveins: $vgpr0
67 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
68 ; GFX9-NEXT: [[DS_READ_U16_gfx9_:%[0-9]+]]:vgpr_32 = DS_READ_U16_gfx9 [[COPY]], 0, 0, implicit $exec :: (load (s16), addrspace 3)
69 ; GFX9-NEXT: $vgpr0 = COPY [[DS_READ_U16_gfx9_]]
70 %0:vgpr(p3) = COPY $vgpr0
71 %1:vgpr(s32) = G_ZEXTLOAD %0 :: (load (s16), align 2, addrspace 3)
77 # name: zextload_local_s16_from_s8_align1
79 # regBankSelected: true
80 # tracksRegLiveness: true
86 # %0:vgpr(p3) = COPY $vgpr0
87 # %1:vgpr(s16) = G_ZEXTLOAD %0 :: (load (s8), align 1, addrspace 3)
88 # %2:vgpr(s32) = G_ANYEXT %1
94 name: zextload_local_s32_from_s8_align1_offset4095
97 tracksRegLiveness: true
103 ; GFX6-LABEL: name: zextload_local_s32_from_s8_align1_offset4095
104 ; GFX6: liveins: $vgpr0
106 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
107 ; GFX6-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4095, implicit $exec
108 ; GFX6-NEXT: %2:vgpr_32, dead %4:sreg_64_xexec = V_ADD_CO_U32_e64 [[COPY]], [[V_MOV_B32_e32_]], 0, implicit $exec
109 ; GFX6-NEXT: [[DS_READ_U8_:%[0-9]+]]:vgpr_32 = DS_READ_U8 %2, 0, 0, implicit $m0, implicit $exec :: (load (s8), addrspace 3)
110 ; GFX6-NEXT: $vgpr0 = COPY [[DS_READ_U8_]]
111 ; GFX7-LABEL: name: zextload_local_s32_from_s8_align1_offset4095
112 ; GFX7: liveins: $vgpr0
114 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
115 ; GFX7-NEXT: [[DS_READ_U8_:%[0-9]+]]:vgpr_32 = DS_READ_U8 [[COPY]], 4095, 0, implicit $m0, implicit $exec :: (load (s8), addrspace 3)
116 ; GFX7-NEXT: $vgpr0 = COPY [[DS_READ_U8_]]
117 ; GFX9-LABEL: name: zextload_local_s32_from_s8_align1_offset4095
118 ; GFX9: liveins: $vgpr0
120 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
121 ; GFX9-NEXT: [[DS_READ_U8_gfx9_:%[0-9]+]]:vgpr_32 = DS_READ_U8_gfx9 [[COPY]], 4095, 0, implicit $exec :: (load (s8), addrspace 3)
122 ; GFX9-NEXT: $vgpr0 = COPY [[DS_READ_U8_gfx9_]]
123 %0:vgpr(p3) = COPY $vgpr0
124 %1:vgpr(s32) = G_CONSTANT i32 4095
125 %2:vgpr(p3) = G_PTR_ADD %0, %1
126 %3:vgpr(s32) = G_ZEXTLOAD %2 :: (load (s8), align 1, addrspace 3)