1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -run-pass=legalizer -o - %s | FileCheck %s
3 # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=tahiti -run-pass=legalizer -o - %s | FileCheck %s
5 name: test_sextload_local_i32_i8
10 ; CHECK-LABEL: name: test_sextload_local_i32_i8
11 ; CHECK: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0
12 ; CHECK: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p3) :: (load 1, addrspace 3)
13 ; CHECK: $vgpr0 = COPY [[SEXTLOAD]](s32)
14 %0:_(p3) = COPY $vgpr0
15 %1:_(s32) = G_SEXTLOAD %0 :: (load 1, addrspace 3)
19 name: test_sextload_local_i32_i16
24 ; CHECK-LABEL: name: test_sextload_local_i32_i16
25 ; CHECK: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0
26 ; CHECK: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p3) :: (load 2, addrspace 3)
27 ; CHECK: $vgpr0 = COPY [[SEXTLOAD]](s32)
28 %0:_(p3) = COPY $vgpr0
29 %1:_(s32) = G_SEXTLOAD %0 :: (load 2, addrspace 3)
33 name: test_sextload_local_i31_i8
38 ; CHECK-LABEL: name: test_sextload_local_i31_i8
39 ; CHECK: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0
40 ; CHECK: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p3) :: (load 1, addrspace 3)
41 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[SEXTLOAD]](s32)
42 ; CHECK: $vgpr0 = COPY [[COPY1]](s32)
43 %0:_(p3) = COPY $vgpr0
44 %1:_(s31) = G_SEXTLOAD %0 :: (load 1, addrspace 3)
45 %2:_(s32) = G_ANYEXT %1
49 name: test_sextload_local_i64_i8
54 ; CHECK-LABEL: name: test_sextload_local_i64_i8
55 ; CHECK: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0
56 ; CHECK: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p3) :: (load 1, addrspace 3)
57 ; CHECK: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[SEXTLOAD]](s32)
58 ; CHECK: $vgpr0_vgpr1 = COPY [[SEXT]](s64)
59 %0:_(p3) = COPY $vgpr0
60 %1:_(s64) = G_SEXTLOAD %0 :: (load 1, addrspace 3)
61 $vgpr0_vgpr1 = COPY %1
64 name: test_sextload_local_i64_i16
69 ; CHECK-LABEL: name: test_sextload_local_i64_i16
70 ; CHECK: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0
71 ; CHECK: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p3) :: (load 2, addrspace 3)
72 ; CHECK: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[SEXTLOAD]](s32)
73 ; CHECK: $vgpr0_vgpr1 = COPY [[SEXT]](s64)
74 %0:_(p3) = COPY $vgpr0
75 %1:_(s64) = G_SEXTLOAD %0 :: (load 2, addrspace 3)
76 $vgpr0_vgpr1 = COPY %1
79 name: test_sextload_local_i64_i32
84 ; CHECK-LABEL: name: test_sextload_local_i64_i32
85 ; CHECK: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0
86 ; CHECK: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load 4, addrspace 3)
87 ; CHECK: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[LOAD]](s32)
88 ; CHECK: $vgpr0_vgpr1 = COPY [[SEXT]](s64)
89 %0:_(p3) = COPY $vgpr0
90 %1:_(s64) = G_SEXTLOAD %0 :: (load 4, addrspace 3)
91 $vgpr0_vgpr1 = COPY %1