llvm.org GIT mirror llvm / 95f12eb
AMDGPU/GlobalISel: Define instruction mapping for G_XOR git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@326524 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
285285 return getInvalidInstructionMapping();
286286 case AMDGPU::G_AND:
287287 case AMDGPU::G_OR:
288 case AMDGPU::G_XOR:
288289 if (isSALUMapping(MI))
289290 return getDefaultMappingSOP(MI);
290291 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: xor_ss
6 legalized: true
7
8 body: |
9 bb.0:
10 liveins: $sgpr0, $sgpr1
11 ; CHECK-LABEL: name: xor_ss
12 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
13 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
14 ; CHECK: [[XOR:%[0-9]+]]:sgpr(s32) = G_XOR [[COPY]], [[COPY1]]
15 %0:_(s32) = COPY $sgpr0
16 %1:_(s32) = COPY $sgpr1
17 %2:_(s32) = G_XOR %0, %1
18 ...
19
20 ---
21 name: xor_sv
22 legalized: true
23
24 body: |
25 bb.0:
26 liveins: $sgpr0, $vgpr0
27 ; CHECK-LABEL: name: xor_sv
28 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
29 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
30 ; CHECK: [[XOR:%[0-9]+]]:vgpr(s32) = G_XOR [[COPY]], [[COPY1]]
31 %0:_(s32) = COPY $sgpr0
32 %1:_(s32) = COPY $vgpr0
33 %2:_(s32) = G_XOR %0, %1
34 ...
35
36 ---
37 name: xor_vs
38 legalized: true
39
40 body: |
41 bb.0:
42 liveins: $sgpr0, $vgpr0
43 ; CHECK-LABEL: name: xor_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: [[XOR:%[0-9]+]]:vgpr(s32) = G_XOR [[COPY]], [[COPY2]]
48 %0:_(s32) = COPY $vgpr0
49 %1:_(s32) = COPY $sgpr0
50 %2:_(s32) = G_XOR %0, %1
51 ...
52
53 ---
54 name: xor_vv
55 legalized: true
56
57 body: |
58 bb.0:
59 liveins: $vgpr0, $vgpr1
60 ; CHECK-LABEL: name: xor_vv
61 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
62 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
63 ; CHECK: [[XOR:%[0-9]+]]:vgpr(s32) = G_XOR [[COPY]], [[COPY1]]
64 %0:_(s32) = COPY $vgpr0
65 %1:_(s32) = COPY $vgpr1
66 %2:_(s32) = G_XOR %0, %1
67 ...