forked from OSchip/llvm-project
parent
e04eb1dc12
commit
1a59711505
|
@ -90,7 +90,7 @@ namespace {
|
|||
unsigned createImplicitDef(MachineBasicBlock &MBB,
|
||||
MachineBasicBlock::iterator InsertBefore,
|
||||
DebugLoc DL);
|
||||
|
||||
|
||||
//
|
||||
// Various property checkers
|
||||
//
|
||||
|
@ -435,7 +435,7 @@ A15SDOptimizer::createDupLane(MachineBasicBlock &MBB,
|
|||
Out)
|
||||
.addReg(Reg)
|
||||
.addImm(Lane));
|
||||
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
|
@ -601,7 +601,7 @@ bool A15SDOptimizer::runOnInstruction(MachineInstr *MI) {
|
|||
// * INSERT_SUBREG: * If the SPR value was originally in another DPR/QPR
|
||||
// lane, and the other lane(s) of the DPR/QPR register
|
||||
// that we are inserting in are undefined, use the
|
||||
// original DPR/QPR value.
|
||||
// original DPR/QPR value.
|
||||
// * Otherwise, fall back on the same stategy as COPY.
|
||||
//
|
||||
// * REG_SEQUENCE: * If all except one of the input operands are
|
||||
|
@ -693,7 +693,7 @@ bool A15SDOptimizer::runOnMachineFunction(MachineFunction &Fn) {
|
|||
MI != ME;) {
|
||||
Modified |= runOnInstruction(MI++);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
for (std::set<MachineInstr *>::iterator I = DeadInstr.begin(),
|
||||
|
|
|
@ -85,7 +85,7 @@ void ARMAsmPrinter::EmitXXStructor(const Constant *CV) {
|
|||
? MCSymbolRefExpr::VK_ARM_TARGET1
|
||||
: MCSymbolRefExpr::VK_None),
|
||||
OutContext);
|
||||
|
||||
|
||||
OutStreamer.EmitValue(E, Size);
|
||||
}
|
||||
|
||||
|
@ -575,7 +575,7 @@ void ARMAsmPrinter::emitAttributes() {
|
|||
getArchForCPU(CPUString, Subtarget));
|
||||
|
||||
// Tag_CPU_arch_profile must have the default value of 0 when "Architecture
|
||||
// profile is not applicable (e.g. pre v7, or cross-profile code)".
|
||||
// profile is not applicable (e.g. pre v7, or cross-profile code)".
|
||||
if (Subtarget->hasV7Ops()) {
|
||||
if (Subtarget->isAClass()) {
|
||||
ATS.emitAttribute(ARMBuildAttrs::CPU_arch_profile,
|
||||
|
|
|
@ -1400,7 +1400,7 @@ bool ARMFastISel::ARMEmitCmp(const Value *Src1Value, const Value *Src2Value,
|
|||
const APInt &CIVal = ConstInt->getValue();
|
||||
Imm = (isZExt) ? (int)CIVal.getZExtValue() : (int)CIVal.getSExtValue();
|
||||
// For INT_MIN/LONG_MIN (i.e., 0x80000000) we need to use a cmp, rather
|
||||
// then a cmn, because there is no way to represent 2147483648 as a
|
||||
// then a cmn, because there is no way to represent 2147483648 as a
|
||||
// signed 32-bit int.
|
||||
if (Imm < 0 && Imm != (int)0x80000000) {
|
||||
isNegativeImm = true;
|
||||
|
|
|
@ -397,7 +397,7 @@ void ARMDAGToDAGISel::PreprocessISelDAG() {
|
|||
N1 = CurDAG->getNode(ISD::SHL, SDLoc(N1), MVT::i32,
|
||||
N1, CurDAG->getConstant(TZ, MVT::i32));
|
||||
CurDAG->UpdateNodeOperands(N, N0, N1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// hasNoVMLxHazardUse - Return true if it's desirable to select a FP MLA / MLS
|
||||
|
@ -1699,10 +1699,10 @@ static bool isVSTfixed(unsigned Opc)
|
|||
case ARM::VST1d16wb_fixed : return true;
|
||||
case ARM::VST1d32wb_fixed : return true;
|
||||
case ARM::VST1d64wb_fixed : return true;
|
||||
case ARM::VST1q8wb_fixed : return true;
|
||||
case ARM::VST1q16wb_fixed : return true;
|
||||
case ARM::VST1q32wb_fixed : return true;
|
||||
case ARM::VST1q64wb_fixed : return true;
|
||||
case ARM::VST1q8wb_fixed : return true;
|
||||
case ARM::VST1q16wb_fixed : return true;
|
||||
case ARM::VST1q32wb_fixed : return true;
|
||||
case ARM::VST1q64wb_fixed : return true;
|
||||
case ARM::VST1d64TPseudoWB_fixed : return true;
|
||||
case ARM::VST1d64QPseudoWB_fixed : return true;
|
||||
case ARM::VST2d8wb_fixed : return true;
|
||||
|
|
|
@ -850,7 +850,7 @@ ARMTargetLowering::ARMTargetLowering(TargetMachine &TM)
|
|||
setOperationAction(ISD::FP32_TO_FP16, MVT::i32, Expand);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Combine sin / cos into one node or libcall if possible.
|
||||
if (Subtarget->hasSinCos()) {
|
||||
setLibcallName(RTLIB::SINCOS_F32, "sincosf");
|
||||
|
@ -8470,7 +8470,7 @@ PerformARMBUILD_VECTORCombine(SDNode *N, TargetLowering::DAGCombinerInfo &DCI) {
|
|||
// Fold obvious case.
|
||||
V = V.getOperand(0);
|
||||
else {
|
||||
V = DAG.getNode(ISD::BITCAST, SDLoc(V), MVT::i32, V);
|
||||
V = DAG.getNode(ISD::BITCAST, SDLoc(V), MVT::i32, V);
|
||||
// Make the DAGCombiner fold the bitcasts.
|
||||
DCI.AddToWorklist(V.getNode());
|
||||
}
|
||||
|
|
|
@ -5617,22 +5617,22 @@ def VCVTxu2fq : N2VCvtQ<1, 1, 0b1110, 0, 1, "vcvt", "f32.u32",
|
|||
v4f32, v4i32, int_arm_neon_vcvtfxu2fp>;
|
||||
}
|
||||
|
||||
def : NEONInstAlias<"vcvt${p}.s32.f32 $Dd, $Dm, #0",
|
||||
def : NEONInstAlias<"vcvt${p}.s32.f32 $Dd, $Dm, #0",
|
||||
(VCVTf2sd DPR:$Dd, DPR:$Dm, pred:$p)>;
|
||||
def : NEONInstAlias<"vcvt${p}.u32.f32 $Dd, $Dm, #0",
|
||||
def : NEONInstAlias<"vcvt${p}.u32.f32 $Dd, $Dm, #0",
|
||||
(VCVTf2ud DPR:$Dd, DPR:$Dm, pred:$p)>;
|
||||
def : NEONInstAlias<"vcvt${p}.f32.s32 $Dd, $Dm, #0",
|
||||
def : NEONInstAlias<"vcvt${p}.f32.s32 $Dd, $Dm, #0",
|
||||
(VCVTs2fd DPR:$Dd, DPR:$Dm, pred:$p)>;
|
||||
def : NEONInstAlias<"vcvt${p}.f32.u32 $Dd, $Dm, #0",
|
||||
def : NEONInstAlias<"vcvt${p}.f32.u32 $Dd, $Dm, #0",
|
||||
(VCVTu2fd DPR:$Dd, DPR:$Dm, pred:$p)>;
|
||||
|
||||
def : NEONInstAlias<"vcvt${p}.s32.f32 $Qd, $Qm, #0",
|
||||
def : NEONInstAlias<"vcvt${p}.s32.f32 $Qd, $Qm, #0",
|
||||
(VCVTf2sq QPR:$Qd, QPR:$Qm, pred:$p)>;
|
||||
def : NEONInstAlias<"vcvt${p}.u32.f32 $Qd, $Qm, #0",
|
||||
def : NEONInstAlias<"vcvt${p}.u32.f32 $Qd, $Qm, #0",
|
||||
(VCVTf2uq QPR:$Qd, QPR:$Qm, pred:$p)>;
|
||||
def : NEONInstAlias<"vcvt${p}.f32.s32 $Qd, $Qm, #0",
|
||||
def : NEONInstAlias<"vcvt${p}.f32.s32 $Qd, $Qm, #0",
|
||||
(VCVTs2fq QPR:$Qd, QPR:$Qm, pred:$p)>;
|
||||
def : NEONInstAlias<"vcvt${p}.f32.u32 $Qd, $Qm, #0",
|
||||
def : NEONInstAlias<"vcvt${p}.f32.u32 $Qd, $Qm, #0",
|
||||
(VCVTu2fq QPR:$Qd, QPR:$Qm, pred:$p)>;
|
||||
|
||||
|
||||
|
@ -6120,7 +6120,7 @@ def : Pat<(f32 (bitconvert (i32 (extractelt (v2i32 DPR:$src), imm:$lane)))),
|
|||
// Vector lengthening move with load, matching extending loads.
|
||||
|
||||
// extload, zextload and sextload for a standard lengthening load. Example:
|
||||
// Lengthen_Single<"8", "i16", "8"> =
|
||||
// Lengthen_Single<"8", "i16", "8"> =
|
||||
// Pat<(v8i16 (extloadvi8 addrmode6:$addr))
|
||||
// (VMOVLuv8i16 (VLD1d8 addrmode6:$addr,
|
||||
// (f64 (IMPLICIT_DEF)), (i32 0)))>;
|
||||
|
@ -6147,7 +6147,7 @@ multiclass Lengthen_Single<string DestLanes, string DestTy, string SrcTy> {
|
|||
// half the lanes available. Example:
|
||||
// Lengthen_HalfSingle<"4", "i16", "8", "i16", "i8"> =
|
||||
// Pat<(v4i16 (extloadvi8 addrmode6oneL32:$addr)),
|
||||
// (EXTRACT_SUBREG (VMOVLuv8i16 (VLD1LNd32 addrmode6oneL32:$addr,
|
||||
// (EXTRACT_SUBREG (VMOVLuv8i16 (VLD1LNd32 addrmode6oneL32:$addr,
|
||||
// (f64 (IMPLICIT_DEF)), (i32 0))),
|
||||
// dsub_0)>;
|
||||
multiclass Lengthen_HalfSingle<string DestLanes, string DestTy, string SrcTy,
|
||||
|
@ -6257,7 +6257,7 @@ defm : Lengthen_Double<"2", "i64", "i16", "4", "i32", "2", "i64">;
|
|||
// Triple lengthening - v2i8 -> v2i16 -> v2i32 -> v2i64
|
||||
def : Pat<(v2i64 (extloadvi8 addrmode6:$addr)),
|
||||
(VMOVLuv2i64 (EXTRACT_SUBREG (VMOVLuv4i32 (EXTRACT_SUBREG (VMOVLuv8i16
|
||||
(VLD1LNd16 addrmode6:$addr,
|
||||
(VLD1LNd16 addrmode6:$addr,
|
||||
(f64 (IMPLICIT_DEF)), (i32 0))), dsub_0)), dsub_0))>;
|
||||
def : Pat<(v2i64 (zextloadvi8 addrmode6:$addr)),
|
||||
(VMOVLuv2i64 (EXTRACT_SUBREG (VMOVLuv4i32 (EXTRACT_SUBREG (VMOVLuv8i16
|
||||
|
|
|
@ -1676,7 +1676,7 @@ defm t2PLI : T2Ipl<0, 1, "pli">, Requires<[IsThumb2,HasV7]>;
|
|||
// pci variant is very similar to i12, but supports negative offsets
|
||||
// from the PC. Only PLD and PLI have pci variants (not PLDW)
|
||||
class T2Iplpci<bits<1> inst, string opc> : T2Iso<(outs), (ins t2ldrlabel:$addr),
|
||||
IIC_Preload, opc, "\t$addr",
|
||||
IIC_Preload, opc, "\t$addr",
|
||||
[(ARMPreload (ARMWrapper tconstpool:$addr),
|
||||
(i32 0), (i32 inst))]>, Sched<[WritePreLd]> {
|
||||
let Inst{31-25} = 0b1111100;
|
||||
|
@ -1918,7 +1918,7 @@ def t2MOVi16 : T2I<(outs rGPR:$Rd), (ins imm0_65535_expr:$imm), IIC_iMOVi,
|
|||
let DecoderMethod = "DecodeT2MOVTWInstruction";
|
||||
}
|
||||
|
||||
def : t2InstAlias<"mov${p} $Rd, $imm",
|
||||
def : t2InstAlias<"mov${p} $Rd, $imm",
|
||||
(t2MOVi16 rGPR:$Rd, imm256_65535_expr:$imm, pred:$p)>;
|
||||
|
||||
def t2MOVi16_ga_pcrel : PseudoInst<(outs rGPR:$Rd),
|
||||
|
@ -3495,8 +3495,8 @@ def t2B : T2I<(outs), (ins uncondbrtarget:$target), IIC_Br,
|
|||
let Inst{25-16} = target{20-11};
|
||||
let Inst{10-0} = target{10-0};
|
||||
let DecoderMethod = "DecodeT2BInstruction";
|
||||
let AsmMatchConverter = "cvtThumbBranches";
|
||||
}
|
||||
let AsmMatchConverter = "cvtThumbBranches";
|
||||
}
|
||||
|
||||
let isNotDuplicable = 1, isIndirectBranch = 1 in {
|
||||
def t2BR_JT : t2PseudoInst<(outs),
|
||||
|
@ -3698,7 +3698,7 @@ def t2DBG : T2I<(outs), (ins imm0_15:$opt), NoItinerary, "dbg", "\t$opt", []> {
|
|||
|
||||
// Secure Monitor Call is a system instruction.
|
||||
// Option = Inst{19-16}
|
||||
def t2SMC : T2I<(outs), (ins imm0_15:$opt), NoItinerary, "smc", "\t$opt",
|
||||
def t2SMC : T2I<(outs), (ins imm0_15:$opt), NoItinerary, "smc", "\t$opt",
|
||||
[]>, Requires<[IsThumb2, HasTrustZone]> {
|
||||
let Inst{31-27} = 0b11110;
|
||||
let Inst{26-20} = 0b1111111;
|
||||
|
@ -4278,7 +4278,7 @@ def : t2InstAlias<"sbc${s}${p} $Rd, $Rn, $ShiftedRm",
|
|||
|
||||
// Aliases for ADD without the ".w" optional width specifier.
|
||||
def : t2InstAlias<"add${s}${p} $Rd, $Rn, $imm",
|
||||
(t2ADDri GPRnopc:$Rd, GPRnopc:$Rn, t2_so_imm:$imm, pred:$p,
|
||||
(t2ADDri GPRnopc:$Rd, GPRnopc:$Rn, t2_so_imm:$imm, pred:$p,
|
||||
cc_out:$s)>;
|
||||
def : t2InstAlias<"add${p} $Rd, $Rn, $imm",
|
||||
(t2ADDri12 GPRnopc:$Rd, GPR:$Rn, imm0_4095:$imm, pred:$p)>;
|
||||
|
|
|
@ -319,13 +319,13 @@ void ARMJITInfo::relocate(void *Function, MachineRelocation *MR,
|
|||
break;
|
||||
}
|
||||
case ARM::reloc_arm_movw: {
|
||||
ResultPtr = ResultPtr & 0xFFFF;
|
||||
ResultPtr = ResultPtr & 0xFFFF;
|
||||
*((intptr_t*)RelocPos) |= ResultPtr & 0xFFF;
|
||||
*((intptr_t*)RelocPos) |= ((ResultPtr >> 12) & 0xF) << 16;
|
||||
break;
|
||||
}
|
||||
case ARM::reloc_arm_movt: {
|
||||
ResultPtr = (ResultPtr >> 16) & 0xFFFF;
|
||||
ResultPtr = (ResultPtr >> 16) & 0xFFFF;
|
||||
*((intptr_t*)RelocPos) |= ResultPtr & 0xFFF;
|
||||
*((intptr_t*)RelocPos) |= ((ResultPtr >> 12) & 0xF) << 16;
|
||||
break;
|
||||
|
|
|
@ -116,13 +116,13 @@ def D15 : ARMReg<15, "d15", [S30, S31]>, DwarfRegNum<[271]>;
|
|||
}
|
||||
|
||||
// VFP3 defines 16 additional double registers
|
||||
def D16 : ARMFReg<16, "d16">, DwarfRegNum<[272]>;
|
||||
def D16 : ARMFReg<16, "d16">, DwarfRegNum<[272]>;
|
||||
def D17 : ARMFReg<17, "d17">, DwarfRegNum<[273]>;
|
||||
def D18 : ARMFReg<18, "d18">, DwarfRegNum<[274]>;
|
||||
def D19 : ARMFReg<19, "d19">, DwarfRegNum<[275]>;
|
||||
def D20 : ARMFReg<20, "d20">, DwarfRegNum<[276]>;
|
||||
def D21 : ARMFReg<21, "d21">, DwarfRegNum<[277]>;
|
||||
def D22 : ARMFReg<22, "d22">, DwarfRegNum<[278]>;
|
||||
def D22 : ARMFReg<22, "d22">, DwarfRegNum<[278]>;
|
||||
def D23 : ARMFReg<23, "d23">, DwarfRegNum<[279]>;
|
||||
def D24 : ARMFReg<24, "d24">, DwarfRegNum<[280]>;
|
||||
def D25 : ARMFReg<25, "d25">, DwarfRegNum<[281]>;
|
||||
|
@ -158,11 +158,11 @@ def Q15 : ARMReg<15, "q15", [D30, D31]>;
|
|||
// Current Program Status Register.
|
||||
// We model fpscr with two registers: FPSCR models the control bits and will be
|
||||
// reserved. FPSCR_NZCV models the flag bits and will be unreserved. APSR_NZCV
|
||||
// models the APSR when it's accessed by some special instructions. In such cases
|
||||
// models the APSR when it's accessed by some special instructions. In such cases
|
||||
// it has the same encoding as PC.
|
||||
def CPSR : ARMReg<0, "cpsr">;
|
||||
def APSR : ARMReg<1, "apsr">;
|
||||
def APSR_NZCV : ARMReg<15, "apsr_nzcv">;
|
||||
def APSR_NZCV : ARMReg<15, "apsr_nzcv">;
|
||||
def SPSR : ARMReg<2, "spsr">;
|
||||
def FPSCR : ARMReg<3, "fpscr">;
|
||||
def FPSCR_NZCV : ARMReg<3, "fpscr_nzcv"> {
|
||||
|
|
|
@ -93,7 +93,7 @@ def ARMV6Itineraries : ProcessorItineraries<
|
|||
InstrItinData<IIC_iMAC32 , [InstrStage<2, [V6_Pipe]>], [5, 1, 1, 2]>,
|
||||
InstrItinData<IIC_iMUL64 , [InstrStage<3, [V6_Pipe]>], [6, 1, 1]>,
|
||||
InstrItinData<IIC_iMAC64 , [InstrStage<3, [V6_Pipe]>], [6, 1, 1, 2]>,
|
||||
|
||||
|
||||
// Integer load pipeline
|
||||
//
|
||||
// Immediate offset
|
||||
|
@ -181,7 +181,7 @@ def ARMV6Itineraries : ProcessorItineraries<
|
|||
//
|
||||
// Store multiple + update
|
||||
InstrItinData<IIC_iStore_mu , [InstrStage<3, [V6_Pipe]>], [2]>,
|
||||
|
||||
|
||||
// Branch
|
||||
//
|
||||
// no delay slots, so the latency of a branch is unimportant
|
||||
|
|
|
@ -31,7 +31,7 @@ class TargetOptions;
|
|||
class ARMSubtarget : public ARMGenSubtargetInfo {
|
||||
protected:
|
||||
enum ARMProcFamilyEnum {
|
||||
Others, CortexA5, CortexA7, CortexA8, CortexA9, CortexA12, CortexA15,
|
||||
Others, CortexA5, CortexA7, CortexA8, CortexA9, CortexA12, CortexA15,
|
||||
CortexR5, Swift, CortexA53, CortexA57, Krait
|
||||
};
|
||||
enum ARMProcClassEnum {
|
||||
|
@ -393,7 +393,7 @@ public:
|
|||
bool isLittle() const { return IsLittle; }
|
||||
|
||||
unsigned getMispredictionPenalty() const;
|
||||
|
||||
|
||||
/// This function returns true if the target has sincos() routine in its
|
||||
/// compiler runtime or math libraries.
|
||||
bool hasSinCos() const;
|
||||
|
|
Loading…
Reference in New Issue