diff --git a/llvm/lib/Target/ARM/ARMInstrFormats.td b/llvm/lib/Target/ARM/ARMInstrFormats.td --- a/llvm/lib/Target/ARM/ARMInstrFormats.td +++ b/llvm/lib/Target/ARM/ARMInstrFormats.td @@ -77,10 +77,6 @@ // it doesn't have a Rn operand. class UnaryDP { bit isUnaryDataProc = 1; } -// Xform16Bit - Indicates this Thumb2 instruction may be transformed into -// a 16-bit Thumb instruction if certain conditions are met. -class Xform16Bit { bit canXformTo16Bit = 1; } - //===----------------------------------------------------------------------===// // ARM Instruction flags. These need to match ARMBaseInstrInfo.h. // @@ -485,12 +481,6 @@ : AsmPseudoInst, Requires<[IsThumb]>; class t2AsmPseudo : AsmPseudoInst, Requires<[IsThumb2]>; -class VFP2AsmPseudo - : AsmPseudoInst, Requires<[HasVFP2]>; -class NEONAsmPseudo - : AsmPseudoInst, Requires<[HasNEON]>; -class MVEAsmPseudo - : AsmPseudoInst, Requires<[HasMVEInt]>; // Pseudo instructions for the code generator. class PseudoInst pattern> @@ -618,10 +608,6 @@ string opc, string asm, list pattern> : I; -class AsI pattern> - : sI; class AXI pattern> : XI pattern> - : XI; - class AIldr_ex_or_acq opcod, bits<2> opcod2, dag oops, dag iops, InstrItinClass itin, string opc, string asm, list pattern> : I opcod, dag oops, dag iops, Format f, InstrItinClass itin, - string asm, list pattern> - : XI { - let Inst{24-21} = opcod; - let Inst{27-26} = 0b00; -} // loads @@ -793,60 +767,8 @@ let Inst{20} = isLd; // L bit let Inst{15-12} = Rt; } -class AI2stridx_reg pattern> - : AI2ldstidx<0, isByte, isPre, oops, iops, im, f, itin, opc, asm, cstr, - pattern> { - // AM2 store w/ two operands: (GPR, am2offset) - // {12} isAdd - // {11-0} imm12/Rm - bits<14> offset; - bits<4> Rn; - let Inst{25} = 1; - let Inst{23} = offset{12}; - let Inst{19-16} = Rn; - let Inst{11-5} = offset{11-5}; - let Inst{4} = 0; - let Inst{3-0} = offset{3-0}; -} - -class AI2stridx_imm pattern> - : AI2ldstidx<0, isByte, isPre, oops, iops, im, f, itin, opc, asm, cstr, - pattern> { - // AM2 store w/ two operands: (GPR, am2offset) - // {12} isAdd - // {11-0} imm12/Rm - bits<14> offset; - bits<4> Rn; - let Inst{25} = 0; - let Inst{23} = offset{12}; - let Inst{19-16} = Rn; - let Inst{11-0} = offset{11-0}; -} -// FIXME: Merge with the above class when addrmode2 gets used for STR, STRB -// but for now use this class for STRT and STRBT. -class AI2stridxT pattern> - : AI2ldstidx<0, isByte, isPre, oops, iops, im, f, itin, opc, asm, cstr, - pattern> { - // AM2 store w/ two operands: (GPR, am2offset) - // {17-14} Rn - // {13} 1 == Rm, 0 == imm12 - // {12} isAdd - // {11-0} imm12/Rm - bits<18> addr; - let Inst{25} = addr{13}; - let Inst{23} = addr{12}; - let Inst{19-16} = addr{17-14}; - let Inst{11-0} = addr{11-0}; -} - // addrmode3 instructions class AI3ld op, bit op20, dag oops, dag iops, Format f, InstrItinClass itin, string opc, string asm, list pattern> @@ -1178,11 +1100,6 @@ let Inst{12} = opcod3; } -// BR_JT instructions -class TJTI pattern> - : ThumbI; - // Thumb1 only class Thumb1I pattern> @@ -1197,15 +1114,6 @@ class T1I pattern> : Thumb1I; -class T1Ix2 pattern> - : Thumb1I; - -// Two-address instructions -class T1It pattern> - : Thumb1I; // Thumb1 instruction that can either be predicated or set CPSR. class Thumb1sI pattern> : Thumb2XI; -class T2JTI pattern> - : Thumb2XI; // Move to/from coprocessor instructions class T2Cop opc, dag oops, dag iops, string opcstr, string asm, diff --git a/llvm/lib/Target/ARM/ARMInstrNEON.td b/llvm/lib/Target/ARM/ARMInstrNEON.td --- a/llvm/lib/Target/ARM/ARMInstrNEON.td +++ b/llvm/lib/Target/ARM/ARMInstrNEON.td @@ -554,21 +554,6 @@ // Classes for VLD* pseudo-instructions with multi-register operands. // These are expanded to real instructions after register allocation. -class VLDQPseudo - : PseudoNLdSt<(outs QPR:$dst), (ins addrmode6:$addr), itin, "">; -class VLDQWBPseudo - : PseudoNLdSt<(outs QPR:$dst, GPR:$wb), - (ins addrmode6:$addr, am6offset:$offset), itin, - "$addr.addr = $wb">; -class VLDQWBfixedPseudo - : PseudoNLdSt<(outs QPR:$dst, GPR:$wb), - (ins addrmode6:$addr), itin, - "$addr.addr = $wb">; -class VLDQWBregisterPseudo - : PseudoNLdSt<(outs QPR:$dst, GPR:$wb), - (ins addrmode6:$addr, rGPR:$offset), itin, - "$addr.addr = $wb">; - class VLDQQPseudo : PseudoNLdSt<(outs QQPR:$dst), (ins addrmode6:$addr), itin, "">; class VLDQQWBPseudo @@ -1662,20 +1647,6 @@ // Classes for VST* pseudo-instructions with multi-register operands. // These are expanded to real instructions after register allocation. -class VSTQPseudo - : PseudoNLdSt<(outs), (ins addrmode6:$addr, QPR:$src), itin, "">; -class VSTQWBPseudo - : PseudoNLdSt<(outs GPR:$wb), - (ins addrmode6:$addr, am6offset:$offset, QPR:$src), itin, - "$addr.addr = $wb">; -class VSTQWBfixedPseudo - : PseudoNLdSt<(outs GPR:$wb), - (ins addrmode6:$addr, QPR:$src), itin, - "$addr.addr = $wb">; -class VSTQWBregisterPseudo - : PseudoNLdSt<(outs GPR:$wb), - (ins addrmode6:$addr, rGPR:$offset, QPR:$src), itin, - "$addr.addr = $wb">; class VSTQQPseudo : PseudoNLdSt<(outs), (ins addrmode6:$addr, QQPR:$src), itin, "">; class VSTQQWBPseudo @@ -3753,18 +3724,6 @@ OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, IntOp>; } -// ....then also with element size of 8 bits: -multiclass N3VLInt_QHS op11_8, bit op4, - InstrItinClass itin16, InstrItinClass itin32, - string OpcodeStr, string Dt, - SDPatternOperator IntOp, bit Commutable = 0> - : N3VLInt_HS { - def v8i16 : N3VLInt; -} - // ....with explicit extend (VABDL). multiclass N3VLIntExt_QHS op11_8, bit op4, InstrItinClass itin, string OpcodeStr, string Dt, @@ -3879,21 +3838,6 @@ OpcodeStr, !strconcat(Dt, "32"), v4i32, v4i32, IntOp>; } -// element sizes of 8, 16 and 32 bits: -multiclass N3VInt3_QHS op11_8, bit op4, - InstrItinClass itinD16, InstrItinClass itinD32, - InstrItinClass itinQ16, InstrItinClass itinQ32, - string OpcodeStr, string Dt, SDPatternOperator IntOp> - :N3VInt3_HS { - // 64-bit vector types. - def v8i8 : N3VDInt3; - // 128-bit vector types. - def v16i8 : N3VQInt3; -} - // Neon Long Multiply-Op vector operations, // element sizes of 8, 16 and 32 bits: multiclass N3VLMulOp_QHS op11_8, bit op4, @@ -3937,15 +3881,6 @@ OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, IntOp>; } -// ....then also with element size of 8 bits: -multiclass N3VLInt3_QHS op11_8, bit op4, - InstrItinClass itin16, InstrItinClass itin32, - string OpcodeStr, string Dt, SDPatternOperator IntOp> - : N3VLInt3_HS { - def v8i16 : N3VLInt3; -} - // ....with explicit extend (VABAL). multiclass N3VLIntExtOp_QHS op11_8, bit op4, InstrItinClass itin, string OpcodeStr, string Dt, diff --git a/llvm/lib/Target/ARM/ARMInstrThumb2.td b/llvm/lib/Target/ARM/ARMInstrThumb2.td --- a/llvm/lib/Target/ARM/ARMInstrThumb2.td +++ b/llvm/lib/Target/ARM/ARMInstrThumb2.td @@ -438,20 +438,6 @@ // Multiclass helpers... // - -class T2OneRegImm pattern> - : T2I { - bits<4> Rd; - bits<12> imm; - - let Inst{11-8} = Rd; - let Inst{26} = imm{11}; - let Inst{14-12} = imm{10-8}; - let Inst{7-0} = imm{7-0}; -} - - class T2sOneRegImm pattern> : T2sI { @@ -478,19 +464,6 @@ } -class T2OneRegShiftedReg pattern> - : T2I { - bits<4> Rd; - bits<12> ShiftedRm; - - let Inst{11-8} = Rd; - let Inst{3-0} = ShiftedRm{3-0}; - let Inst{5-4} = ShiftedRm{6-5}; - let Inst{14-12} = ShiftedRm{11-9}; - let Inst{7-6} = ShiftedRm{8-7}; -} - class T2sOneRegShiftedReg pattern> : T2sI { @@ -548,20 +521,6 @@ } -class T2TwoRegImm pattern> - : T2I { - bits<4> Rd; - bits<4> Rn; - bits<12> imm; - - let Inst{11-8} = Rd; - let Inst{19-16} = Rn; - let Inst{26} = imm{11}; - let Inst{14-12} = imm{10-8}; - let Inst{7-0} = imm{7-0}; -} - class T2sTwoRegImm pattern> : T2sI { @@ -638,21 +597,6 @@ let Inst{3-0} = Rm; } -class T2TwoRegShiftedReg pattern> - : T2I { - bits<4> Rd; - bits<4> Rn; - bits<12> ShiftedRm; - - let Inst{11-8} = Rd; - let Inst{19-16} = Rn; - let Inst{3-0} = ShiftedRm{3-0}; - let Inst{5-4} = ShiftedRm{6-5}; - let Inst{14-12} = ShiftedRm{11-9}; - let Inst{7-6} = ShiftedRm{8-7}; -} - class T2sTwoRegShiftedReg pattern> : T2sI { diff --git a/llvm/lib/Target/ARM/CMakeLists.txt b/llvm/lib/Target/ARM/CMakeLists.txt --- a/llvm/lib/Target/ARM/CMakeLists.txt +++ b/llvm/lib/Target/ARM/CMakeLists.txt @@ -8,7 +8,7 @@ tablegen(LLVM ARMGenDAGISel.inc -gen-dag-isel) tablegen(LLVM ARMGenDisassemblerTables.inc -gen-disassembler) tablegen(LLVM ARMGenFastISel.inc -gen-fast-isel) -tablegen(LLVM ARMGenGlobalISel.inc -gen-global-isel) +tablegen(LLVM ARMGenGlobalISel.inc -gen-global-isel -warn-on-unused-entities) tablegen(LLVM ARMGenInstrInfo.inc -gen-instr-info) tablegen(LLVM ARMGenMCCodeEmitter.inc -gen-emitter) tablegen(LLVM ARMGenMCPseudoLowering.inc -gen-pseudo-lowering)