llvm.org GIT mirror llvm / 52088d0
AMDGPU/GlobalISel: Define instruction mapping for G_SHL Patch by Tom Stellard git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@326525 91177308-0d34-0410-b5e6-96231b3b80d8 Matt Arsenault 2 years ago
2 changed file(s) with 69 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
286286 case AMDGPU::G_AND:
287287 case AMDGPU::G_OR:
288288 case AMDGPU::G_XOR:
289 case AMDGPU::G_SHL:
289290 if (isSALUMapping(MI))
290291 return getDefaultMappingSOP(MI);
291292 return getDefaultMappingVOP(MI);
0 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
1 # RUN: llc -march=amdgcn -mcpu=fiji -run-pass=regbankselect -global-isel %s -verify-machineinstrs -o - -regbankselect-fast | FileCheck %s
2 # RUN: llc -march=amdgcn -mcpu=fiji -run-pass=regbankselect -global-isel %s -verify-machineinstrs -o - -regbankselect-greedy | FileCheck %s
3
4 ---
5 name: shl_ss
6 legalized: true
7
8 body: |
9 bb.0:
10 liveins: $sgpr0, $sgpr1
11 ; CHECK-LABEL: name: shl_ss
12 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
13 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
14 ; CHECK: [[SHL:%[0-9]+]]:sgpr(s32) = G_SHL [[COPY]], [[COPY1]]
15 %0:_(s32) = COPY $sgpr0
16 %1:_(s32) = COPY $sgpr1
17 %2:_(s32) = G_SHL %0, %1
18 ...
19
20 ---
21 name: shl_sv
22 legalized: true
23
24 body: |
25 bb.0:
26 liveins: $sgpr0, $vgpr0
27 ; CHECK-LABEL: name: shl_sv
28 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
29 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
30 ; CHECK: [[SHL:%[0-9]+]]:vgpr(s32) = G_SHL [[COPY]], [[COPY1]]
31 %0:_(s32) = COPY $sgpr0
32 %1:_(s32) = COPY $vgpr0
33 %2:_(s32) = G_SHL %0, %1
34 ...
35
36 ---
37 name: shl_vs
38 legalized: true
39
40 body: |
41 bb.0:
42 liveins: $sgpr0, $vgpr0
43 ; CHECK-LABEL: name: shl_vs
44 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
45 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
46 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
47 ; CHECK: [[SHL:%[0-9]+]]:vgpr(s32) = G_SHL [[COPY]], [[COPY2]]
48 %0:_(s32) = COPY $vgpr0
49 %1:_(s32) = COPY $sgpr0
50 %2:_(s32) = G_SHL %0, %1
51 ...
52
53 ---
54 name: shl_vv
55 legalized: true
56
57 body: |
58 bb.0:
59 liveins: $vgpr0, $vgpr1
60 ; CHECK-LABEL: name: shl_vv
61 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
62 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
63 ; CHECK: [[SHL:%[0-9]+]]:vgpr(s32) = G_SHL [[COPY]], [[COPY1]]
64 %0:_(s32) = COPY $vgpr0
65 %1:_(s32) = COPY $vgpr1
66 %2:_(s32) = G_SHL %0, %1
67 ...