llvm.org GIT mirror llvm / 8f583a2
AMDGPU/GlobalISel: Define instruction mapping for G_AND Patch by Tom Stellard git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@326523 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
283283 switch (MI.getOpcode()) {
284284 default:
285285 return getInvalidInstructionMapping();
286 case AMDGPU::G_AND:
286287 case AMDGPU::G_OR:
287288 if (isSALUMapping(MI))
288289 return getDefaultMappingSOP(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: and_ss
6 legalized: true
7
8 body: |
9 bb.0:
10 liveins: $sgpr0, $sgpr1
11 ; CHECK-LABEL: name: and_ss
12 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
13 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
14 ; CHECK: [[AND:%[0-9]+]]:sgpr(s32) = G_AND [[COPY]], [[COPY1]]
15 %0:_(s32) = COPY $sgpr0
16 %1:_(s32) = COPY $sgpr1
17 %2:_(s32) = G_AND %0, %1
18 ...
19
20 ---
21 name: and_sv
22 legalized: true
23
24 body: |
25 bb.0:
26 liveins: $sgpr0, $vgpr0
27 ; CHECK-LABEL: name: and_sv
28 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
29 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
30 ; CHECK: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[COPY]], [[COPY1]]
31 %0:_(s32) = COPY $sgpr0
32 %1:_(s32) = COPY $vgpr0
33 %2:_(s32) = G_AND %0, %1
34 ...
35
36 ---
37 name: and_vs
38 legalized: true
39
40 body: |
41 bb.0:
42 liveins: $sgpr0, $vgpr0
43 ; CHECK-LABEL: name: and_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: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[COPY]], [[COPY2]]
48 %0:_(s32) = COPY $vgpr0
49 %1:_(s32) = COPY $sgpr0
50 %2:_(s32) = G_AND %0, %1
51 ...
52
53 ---
54 name: and_vv
55 legalized: true
56
57 body: |
58 bb.0:
59 liveins: $vgpr0, $vgpr1
60 ; CHECK-LABEL: name: and_vv
61 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
62 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
63 ; CHECK: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[COPY]], [[COPY1]]
64 %0:_(s32) = COPY $vgpr0
65 %1:_(s32) = COPY $vgpr1
66 %2:_(s32) = G_AND %0, %1
67 ...