Skip to content

Commit 94e1716

Browse files
SC llvm teamSC llvm team
authored andcommitted
Merged main:ea81e31aa11c into amd-gfx:376ca00d5225
Local branch amd-gfx 376ca00 Merged main:28d91a6e17c5 into amd-gfx:ebf5bb705044 Remote branch main ea81e31 [X86][AVX10] Allow AVX10 use VBMI2 instructions (llvm#73276)
2 parents 376ca00 + ea81e31 commit 94e1716

24 files changed

+2482
-2020
lines changed

llvm/include/llvm/CodeGen/SelectionDAGISel.h

Lines changed: 43 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -124,17 +124,31 @@ class SelectionDAGISel : public MachineFunctionPass {
124124
enum BuiltinOpcodes {
125125
OPC_Scope,
126126
OPC_RecordNode,
127-
OPC_RecordChild0, OPC_RecordChild1, OPC_RecordChild2, OPC_RecordChild3,
128-
OPC_RecordChild4, OPC_RecordChild5, OPC_RecordChild6, OPC_RecordChild7,
127+
OPC_RecordChild0,
128+
OPC_RecordChild1,
129+
OPC_RecordChild2,
130+
OPC_RecordChild3,
131+
OPC_RecordChild4,
132+
OPC_RecordChild5,
133+
OPC_RecordChild6,
134+
OPC_RecordChild7,
129135
OPC_RecordMemRef,
130136
OPC_CaptureGlueInput,
131137
OPC_MoveChild,
132-
OPC_MoveChild0, OPC_MoveChild1, OPC_MoveChild2, OPC_MoveChild3,
133-
OPC_MoveChild4, OPC_MoveChild5, OPC_MoveChild6, OPC_MoveChild7,
138+
OPC_MoveChild0,
139+
OPC_MoveChild1,
140+
OPC_MoveChild2,
141+
OPC_MoveChild3,
142+
OPC_MoveChild4,
143+
OPC_MoveChild5,
144+
OPC_MoveChild6,
145+
OPC_MoveChild7,
134146
OPC_MoveParent,
135147
OPC_CheckSame,
136-
OPC_CheckChild0Same, OPC_CheckChild1Same,
137-
OPC_CheckChild2Same, OPC_CheckChild3Same,
148+
OPC_CheckChild0Same,
149+
OPC_CheckChild1Same,
150+
OPC_CheckChild2Same,
151+
OPC_CheckChild3Same,
138152
OPC_CheckPatternPredicate,
139153
OPC_CheckPatternPredicate2,
140154
OPC_CheckPredicate,
@@ -144,16 +158,26 @@ class SelectionDAGISel : public MachineFunctionPass {
144158
OPC_CheckType,
145159
OPC_CheckTypeRes,
146160
OPC_SwitchType,
147-
OPC_CheckChild0Type, OPC_CheckChild1Type, OPC_CheckChild2Type,
148-
OPC_CheckChild3Type, OPC_CheckChild4Type, OPC_CheckChild5Type,
149-
OPC_CheckChild6Type, OPC_CheckChild7Type,
161+
OPC_CheckChild0Type,
162+
OPC_CheckChild1Type,
163+
OPC_CheckChild2Type,
164+
OPC_CheckChild3Type,
165+
OPC_CheckChild4Type,
166+
OPC_CheckChild5Type,
167+
OPC_CheckChild6Type,
168+
OPC_CheckChild7Type,
150169
OPC_CheckInteger,
151-
OPC_CheckChild0Integer, OPC_CheckChild1Integer, OPC_CheckChild2Integer,
152-
OPC_CheckChild3Integer, OPC_CheckChild4Integer,
153-
OPC_CheckCondCode, OPC_CheckChild2CondCode,
170+
OPC_CheckChild0Integer,
171+
OPC_CheckChild1Integer,
172+
OPC_CheckChild2Integer,
173+
OPC_CheckChild3Integer,
174+
OPC_CheckChild4Integer,
175+
OPC_CheckCondCode,
176+
OPC_CheckChild2CondCode,
154177
OPC_CheckValueType,
155178
OPC_CheckComplexPat,
156-
OPC_CheckAndImm, OPC_CheckOrImm,
179+
OPC_CheckAndImm,
180+
OPC_CheckOrImm,
157181
OPC_CheckImmAllOnesV,
158182
OPC_CheckImmAllZerosV,
159183
OPC_CheckFoldableChainNode,
@@ -172,10 +196,14 @@ class SelectionDAGISel : public MachineFunctionPass {
172196
OPC_EmitNodeXForm,
173197
OPC_EmitNode,
174198
// Space-optimized forms that implicitly encode number of result VTs.
175-
OPC_EmitNode0, OPC_EmitNode1, OPC_EmitNode2,
199+
OPC_EmitNode0,
200+
OPC_EmitNode1,
201+
OPC_EmitNode2,
176202
OPC_MorphNodeTo,
177203
// Space-optimized forms that implicitly encode number of result VTs.
178-
OPC_MorphNodeTo0, OPC_MorphNodeTo1, OPC_MorphNodeTo2,
204+
OPC_MorphNodeTo0,
205+
OPC_MorphNodeTo1,
206+
OPC_MorphNodeTo2,
179207
OPC_CompleteMatch,
180208
// Contains offset in table for pattern being selected
181209
OPC_Coverage

llvm/include/llvm/Config/llvm-config.h.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
/* Indicate that this is LLVM compiled from the amd-gfx branch. */
1818
#define LLVM_HAVE_BRANCH_AMD_GFX
19-
#define LLVM_MAIN_REVISION 481620
19+
#define LLVM_MAIN_REVISION 481626
2020

2121
/* Define if LLVM_ENABLE_DUMP is enabled */
2222
#cmakedefine LLVM_ENABLE_DUMP

llvm/include/llvm/Support/X86DisassemblerDecoderCommon.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ namespace X86Disassembler {
3131
#define XOP9_MAP_SYM x86DisassemblerXOP9Opcodes
3232
#define XOPA_MAP_SYM x86DisassemblerXOPAOpcodes
3333
#define THREEDNOW_MAP_SYM x86Disassembler3DNowOpcodes
34+
#define MAP4_SYM x86DisassemblerMap4Opcodes
3435
#define MAP5_SYM x86DisassemblerMap5Opcodes
3536
#define MAP6_SYM x86DisassemblerMap6Opcodes
3637
#define MAP7_SYM x86DisassemblerMap7Opcodes
@@ -45,6 +46,7 @@ namespace X86Disassembler {
4546
#define XOP9_MAP_STR "x86DisassemblerXOP9Opcodes"
4647
#define XOPA_MAP_STR "x86DisassemblerXOPAOpcodes"
4748
#define THREEDNOW_MAP_STR "x86Disassembler3DNowOpcodes"
49+
#define MAP4_STR "x86DisassemblerMap4Opcodes"
4850
#define MAP5_STR "x86DisassemblerMap5Opcodes"
4951
#define MAP6_STR "x86DisassemblerMap6Opcodes"
5052
#define MAP7_STR "x86DisassemblerMap7Opcodes"
@@ -324,9 +326,10 @@ enum OpcodeType {
324326
XOP9_MAP = 5,
325327
XOPA_MAP = 6,
326328
THREEDNOW_MAP = 7,
327-
MAP5 = 8,
328-
MAP6 = 9,
329-
MAP7 = 10
329+
MAP4 = 8,
330+
MAP5 = 9,
331+
MAP6 = 10,
332+
MAP7 = 11
330333
};
331334

332335
// The following structs are used for the hierarchical decode table. After

llvm/lib/Target/X86/Disassembler/X86Disassembler.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ static InstrUID decode(OpcodeType type, InstructionContext insnContext,
150150
dec =
151151
&THREEDNOW_MAP_SYM.opcodeDecisions[insnContext].modRMDecisions[opcode];
152152
break;
153+
case MAP4:
154+
dec = &MAP4_SYM.opcodeDecisions[insnContext].modRMDecisions[opcode];
155+
break;
153156
case MAP5:
154157
dec = &MAP5_SYM.opcodeDecisions[insnContext].modRMDecisions[opcode];
155158
break;
@@ -929,6 +932,9 @@ static bool readOpcode(struct InternalInstruction *insn) {
929932
case VEX_LOB_0F3A:
930933
insn->opcodeType = THREEBYTE_3A;
931934
return consume(insn, insn->opcode);
935+
case VEX_LOB_MAP4:
936+
insn->opcodeType = MAP4;
937+
return consume(insn, insn->opcode);
932938
case VEX_LOB_MAP5:
933939
insn->opcodeType = MAP5;
934940
return consume(insn, insn->opcode);
@@ -1100,6 +1106,9 @@ static int getInstructionIDWithAttrMask(uint16_t *instructionID,
11001106
case THREEDNOW_MAP:
11011107
decision = &THREEDNOW_MAP_SYM;
11021108
break;
1109+
case MAP4:
1110+
decision = &MAP4_SYM;
1111+
break;
11031112
case MAP5:
11041113
decision = &MAP5_SYM;
11051114
break;

llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,7 @@ enum VEXLeadingOpcodeByte {
628628
VEX_LOB_0F = 0x1,
629629
VEX_LOB_0F38 = 0x2,
630630
VEX_LOB_0F3A = 0x3,
631+
VEX_LOB_MAP4 = 0x4,
631632
VEX_LOB_MAP5 = 0x5,
632633
VEX_LOB_MAP6 = 0x6,
633634
VEX_LOB_MAP7 = 0x7

0 commit comments

Comments
 (0)