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: liveins: $vgpr0
13 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0
14 ; CHECK-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p3) :: (load (s8), addrspace 3)
15 ; CHECK-NEXT: $vgpr0 = COPY [[SEXTLOAD]](s32)
16 %0:_(p3) = COPY $vgpr0
17 %1:_(s32) = G_SEXTLOAD %0 :: (load (s8), addrspace 3)
21 name: test_sextload_local_i32_i16
26 ; CHECK-LABEL: name: test_sextload_local_i32_i16
27 ; CHECK: liveins: $vgpr0
29 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0
30 ; CHECK-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p3) :: (load (s16), addrspace 3)
31 ; CHECK-NEXT: $vgpr0 = COPY [[SEXTLOAD]](s32)
32 %0:_(p3) = COPY $vgpr0
33 %1:_(s32) = G_SEXTLOAD %0 :: (load (s16), addrspace 3)
37 name: test_sextload_local_i31_i8
42 ; CHECK-LABEL: name: test_sextload_local_i31_i8
43 ; CHECK: liveins: $vgpr0
45 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0
46 ; CHECK-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p3) :: (load (s8), addrspace 3)
47 ; CHECK-NEXT: $vgpr0 = COPY [[SEXTLOAD]](s32)
48 %0:_(p3) = COPY $vgpr0
49 %1:_(s31) = G_SEXTLOAD %0 :: (load (s8), addrspace 3)
50 %2:_(s32) = G_ANYEXT %1
54 name: test_sextload_local_i64_i8
59 ; CHECK-LABEL: name: test_sextload_local_i64_i8
60 ; CHECK: liveins: $vgpr0
62 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0
63 ; CHECK-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p3) :: (load (s8), addrspace 3)
64 ; CHECK-NEXT: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[SEXTLOAD]](s32)
65 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[SEXT]](s64)
66 %0:_(p3) = COPY $vgpr0
67 %1:_(s64) = G_SEXTLOAD %0 :: (load (s8), addrspace 3)
68 $vgpr0_vgpr1 = COPY %1
71 name: test_sextload_local_i64_i16
76 ; CHECK-LABEL: name: test_sextload_local_i64_i16
77 ; CHECK: liveins: $vgpr0
79 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0
80 ; CHECK-NEXT: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p3) :: (load (s16), addrspace 3)
81 ; CHECK-NEXT: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[SEXTLOAD]](s32)
82 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[SEXT]](s64)
83 %0:_(p3) = COPY $vgpr0
84 %1:_(s64) = G_SEXTLOAD %0 :: (load (s16), addrspace 3)
85 $vgpr0_vgpr1 = COPY %1
88 name: test_sextload_local_i64_i32
93 ; CHECK-LABEL: name: test_sextload_local_i64_i32
94 ; CHECK: liveins: $vgpr0_vgpr1
96 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0
97 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load (s32), addrspace 3)
98 ; CHECK-NEXT: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[LOAD]](s32)
99 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[SEXT]](s64)
100 %0:_(p3) = COPY $vgpr0
101 %1:_(s64) = G_SEXTLOAD %0 :: (load (s32), addrspace 3)
102 $vgpr0_vgpr1 = COPY %1