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
6 name: test_sextload_global_i32_i8
11 ; CHECK-LABEL: name: test_sextload_global_i32_i8
12 ; CHECK: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
13 ; CHECK: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p1) :: (load 1, addrspace 1)
14 ; CHECK: $vgpr0 = COPY [[SEXTLOAD]](s32)
15 %0:_(p1) = COPY $vgpr0_vgpr1
16 %1:_(s32) = G_SEXTLOAD %0 :: (load 1, addrspace 1)
20 name: test_sextload_global_i32_i16
25 ; CHECK-LABEL: name: test_sextload_global_i32_i16
26 ; CHECK: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
27 ; CHECK: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p1) :: (load 2, addrspace 1)
28 ; CHECK: $vgpr0 = COPY [[SEXTLOAD]](s32)
29 %0:_(p1) = COPY $vgpr0_vgpr1
30 %1:_(s32) = G_SEXTLOAD %0 :: (load 2, addrspace 1)
34 name: test_sextload_global_i31_i8
39 ; CHECK-LABEL: name: test_sextload_global_i31_i8
40 ; CHECK: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
41 ; CHECK: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p1) :: (load 1, addrspace 1)
42 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[SEXTLOAD]](s32)
43 ; CHECK: $vgpr0 = COPY [[COPY1]](s32)
44 %0:_(p1) = COPY $vgpr0_vgpr1
45 %1:_(s31) = G_SEXTLOAD %0 :: (load 1, addrspace 1)
46 %2:_(s32) = G_ANYEXT %1
50 name: test_sextload_global_i64_i8
55 ; CHECK-LABEL: name: test_sextload_global_i64_i8
56 ; CHECK: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
57 ; CHECK: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p1) :: (load 1, addrspace 1)
58 ; CHECK: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[SEXTLOAD]](s32)
59 ; CHECK: $vgpr0_vgpr1 = COPY [[SEXT]](s64)
60 %0:_(p1) = COPY $vgpr0_vgpr1
61 %1:_(s64) = G_SEXTLOAD %0 :: (load 1, addrspace 1)
62 $vgpr0_vgpr1 = COPY %1
65 name: test_sextload_global_i64_i16
70 ; CHECK-LABEL: name: test_sextload_global_i64_i16
71 ; CHECK: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
72 ; CHECK: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p1) :: (load 2, addrspace 1)
73 ; CHECK: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[SEXTLOAD]](s32)
74 ; CHECK: $vgpr0_vgpr1 = COPY [[SEXT]](s64)
75 %0:_(p1) = COPY $vgpr0_vgpr1
76 %1:_(s64) = G_SEXTLOAD %0 :: (load 2, addrspace 1)
77 $vgpr0_vgpr1 = COPY %1
80 name: test_sextload_global_i64_i32
85 ; CHECK-LABEL: name: test_sextload_global_i64_i32
86 ; CHECK: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
87 ; CHECK: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p1) :: (load 4, addrspace 1)
88 ; CHECK: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[LOAD]](s32)
89 ; CHECK: $vgpr0_vgpr1 = COPY [[SEXT]](s64)
90 %0:_(p1) = COPY $vgpr0_vgpr1
91 %1:_(s64) = G_SEXTLOAD %0 :: (load 4, addrspace 1)
92 $vgpr0_vgpr1 = COPY %1