parent
a9cb538a74
commit
0a7d0ad95f
|
@ -49,7 +49,7 @@ INITIALIZE_PASS_BEGIN(DemandedBits, "demanded-bits", "Demanded bits analysis",
|
|||
INITIALIZE_PASS_DEPENDENCY(AssumptionCacheTracker)
|
||||
INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass)
|
||||
INITIALIZE_PASS_END(DemandedBits, "demanded-bits", "Demanded bits analysis",
|
||||
false, false)
|
||||
false, false)
|
||||
|
||||
DemandedBits::DemandedBits() : FunctionPass(ID) {
|
||||
initializeDemandedBitsPass(*PassRegistry::getPassRegistry());
|
||||
|
@ -67,12 +67,10 @@ static bool isAlwaysLive(Instruction *I) {
|
|||
I->isEHPad() || I->mayHaveSideEffects();
|
||||
}
|
||||
|
||||
void
|
||||
DemandedBits::determineLiveOperandBits(const Instruction *UserI,
|
||||
const Instruction *I, unsigned OperandNo,
|
||||
const APInt &AOut, APInt &AB,
|
||||
APInt &KnownZero, APInt &KnownOne,
|
||||
APInt &KnownZero2, APInt &KnownOne2) {
|
||||
void DemandedBits::determineLiveOperandBits(
|
||||
const Instruction *UserI, const Instruction *I, unsigned OperandNo,
|
||||
const APInt &AOut, APInt &AB, APInt &KnownZero, APInt &KnownOne,
|
||||
APInt &KnownZero2, APInt &KnownOne2) {
|
||||
unsigned BitWidth = AB.getBitWidth();
|
||||
|
||||
// We're called once per operand, but for some instructions, we need to
|
||||
|
|
|
@ -1786,7 +1786,7 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST,
|
|||
DebugLoc InlinedAtDL(InlinedAt);
|
||||
if (InlinedAtDL && MF) {
|
||||
OS << " inlined @[ ";
|
||||
InlinedAtDL.print(OS);
|
||||
InlinedAtDL.print(OS);
|
||||
OS << " ]";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -205,9 +205,9 @@ void TargetLowering::softenSetCCOperands(SelectionDAG &DAG, EVT VT,
|
|||
|
||||
// Use the target specific return value for comparions lib calls.
|
||||
EVT RetVT = getCmpLibcallReturnType();
|
||||
SDValue Ops[2] = { NewLHS, NewRHS };
|
||||
NewLHS = makeLibCall(DAG, LC1, RetVT, Ops, 2, false/*sign irrelevant*/,
|
||||
dl).first;
|
||||
SDValue Ops[2] = {NewLHS, NewRHS};
|
||||
NewLHS =
|
||||
makeLibCall(DAG, LC1, RetVT, Ops, 2, false /*sign irrelevant*/, dl).first;
|
||||
NewRHS = DAG.getConstant(0, dl, RetVT);
|
||||
|
||||
CCCode = getCmpLibcallCC(LC1);
|
||||
|
|
|
@ -733,11 +733,11 @@ void MCObjectFileInfo::initCOFFMCObjectFileInfo(Triple T) {
|
|||
".tls$", COFF::IMAGE_SCN_CNT_INITIALIZED_DATA | COFF::IMAGE_SCN_MEM_READ |
|
||||
COFF::IMAGE_SCN_MEM_WRITE,
|
||||
SectionKind::getDataRel());
|
||||
|
||||
|
||||
StackMapSection = Ctx->getCOFFSection(".llvm_stackmaps",
|
||||
COFF::IMAGE_SCN_CNT_INITIALIZED_DATA |
|
||||
COFF::IMAGE_SCN_MEM_READ,
|
||||
SectionKind::getReadOnly());
|
||||
SectionKind::getReadOnly());
|
||||
}
|
||||
|
||||
void MCObjectFileInfo::InitMCObjectFileInfo(const Triple &TheTriple,
|
||||
|
|
|
@ -456,9 +456,9 @@ void MachObjectWriter::bindIndirectSymbols(MCAssembler &Asm) {
|
|||
if (Section.getType() != MachO::S_NON_LAZY_SYMBOL_POINTERS &&
|
||||
Section.getType() != MachO::S_LAZY_SYMBOL_POINTERS &&
|
||||
Section.getType() != MachO::S_SYMBOL_STUBS) {
|
||||
MCSymbol &Symbol = *it->Symbol;
|
||||
report_fatal_error("indirect symbol '" + Symbol.getName() +
|
||||
"' not in a symbol pointer or stub section");
|
||||
MCSymbol &Symbol = *it->Symbol;
|
||||
report_fatal_error("indirect symbol '" + Symbol.getName() +
|
||||
"' not in a symbol pointer or stub section");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ NewArchiveIterator::getFD(sys::fs::file_status &NewStatus) const {
|
|||
|
||||
template <typename T>
|
||||
static void printWithSpacePadding(raw_fd_ostream &OS, T Data, unsigned Size,
|
||||
bool MayTruncate = false) {
|
||||
bool MayTruncate = false) {
|
||||
uint64_t OldPos = OS.tell();
|
||||
OS << Data;
|
||||
unsigned SizeSoFar = OS.tell() - OldPos;
|
||||
|
|
|
@ -1132,8 +1132,7 @@ Triple MachOObjectFile::getThumbArch(uint32_t CPUType, uint32_t CPUSubType,
|
|||
}
|
||||
|
||||
Triple MachOObjectFile::getArch(uint32_t CPUType, uint32_t CPUSubType,
|
||||
const char **McpuDefault,
|
||||
Triple *ThumbTriple) {
|
||||
const char **McpuDefault, Triple *ThumbTriple) {
|
||||
Triple T = MachOObjectFile::getArch(CPUType, CPUSubType, McpuDefault);
|
||||
*ThumbTriple = MachOObjectFile::getThumbArch(CPUType, CPUSubType,
|
||||
McpuDefault);
|
||||
|
|
|
@ -50,9 +50,8 @@ int getPosixProtectionFlags(unsigned Flags) {
|
|||
return PROT_READ | PROT_WRITE;
|
||||
case llvm::sys::Memory::MF_READ|llvm::sys::Memory::MF_EXEC:
|
||||
return PROT_READ | PROT_EXEC;
|
||||
case llvm::sys::Memory::MF_READ |
|
||||
llvm::sys::Memory::MF_WRITE |
|
||||
llvm::sys::Memory::MF_EXEC:
|
||||
case llvm::sys::Memory::MF_READ | llvm::sys::Memory::MF_WRITE |
|
||||
llvm::sys::Memory::MF_EXEC:
|
||||
return PROT_READ | PROT_WRITE | PROT_EXEC;
|
||||
case llvm::sys::Memory::MF_EXEC:
|
||||
#if defined(__FreeBSD__)
|
||||
|
|
|
@ -90,8 +90,8 @@ MCSection *AArch64MCExpr::findAssociatedSection() const {
|
|||
}
|
||||
|
||||
bool AArch64MCExpr::evaluateAsRelocatableImpl(MCValue &Res,
|
||||
const MCAsmLayout *Layout,
|
||||
const MCFixup *Fixup) const {
|
||||
const MCAsmLayout *Layout,
|
||||
const MCFixup *Fixup) const {
|
||||
if (!getSubExpr()->evaluateAsRelocatable(Res, Layout, Fixup))
|
||||
return false;
|
||||
|
||||
|
|
|
@ -151,9 +151,8 @@ public:
|
|||
|
||||
MCSection *findAssociatedSection() const override;
|
||||
|
||||
bool evaluateAsRelocatableImpl(MCValue &Res,
|
||||
const MCAsmLayout *Layout,
|
||||
const MCFixup *Fixup) const override;
|
||||
bool evaluateAsRelocatableImpl(MCValue &Res, const MCAsmLayout *Layout,
|
||||
const MCFixup *Fixup) const override;
|
||||
|
||||
void fixELFSymbolsInTLSFixups(MCAssembler &Asm) const override;
|
||||
|
||||
|
|
|
@ -283,7 +283,7 @@ void AMDGPUAsmPrinter::getSIProgramInfo(SIProgramInfo &ProgInfo,
|
|||
}
|
||||
unsigned reg = MO.getReg();
|
||||
if (reg == AMDGPU::VCC || reg == AMDGPU::VCC_LO ||
|
||||
reg == AMDGPU::VCC_HI) {
|
||||
reg == AMDGPU::VCC_HI) {
|
||||
VCCUsed = true;
|
||||
continue;
|
||||
} else if (reg == AMDGPU::FLAT_SCR ||
|
||||
|
|
|
@ -1112,8 +1112,8 @@ bool AMDGPUDAGToDAGISel::SelectMUBUFAddr64(SDValue Addr, SDValue &SRsrc,
|
|||
|
||||
bool AMDGPUDAGToDAGISel::SelectMUBUFAddr64(SDValue Addr, SDValue &SRsrc,
|
||||
SDValue &VAddr, SDValue &SOffset,
|
||||
SDValue &Offset,
|
||||
SDValue &SLC) const {
|
||||
SDValue &Offset,
|
||||
SDValue &SLC) const {
|
||||
SLC = CurDAG->getTargetConstant(0, SDLoc(Addr), MVT::i1);
|
||||
SDValue GLC, TFE;
|
||||
|
||||
|
|
|
@ -592,11 +592,11 @@ void AMDGPUInstPrinter::printSendMsg(const MCInst *MI, unsigned OpNo,
|
|||
} else {
|
||||
unsigned Stream = (SImm16 >> 8) & 0x3;
|
||||
if (Op == 1)
|
||||
O << "cut";
|
||||
O << "cut";
|
||||
else if (Op == 2)
|
||||
O << "emit";
|
||||
O << "emit";
|
||||
else if (Op == 3)
|
||||
O << "emit-cut";
|
||||
O << "emit-cut";
|
||||
O << " stream " << Stream;
|
||||
}
|
||||
O << "), [m0] ";
|
||||
|
|
|
@ -81,7 +81,7 @@ enum FCInstr {
|
|||
|
||||
MCCodeEmitter *llvm::createR600MCCodeEmitter(const MCInstrInfo &MCII,
|
||||
const MCRegisterInfo &MRI,
|
||||
MCContext &Ctx) {
|
||||
MCContext &Ctx) {
|
||||
return new R600MCCodeEmitter(MCII, MRI);
|
||||
}
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ unsigned SIRegisterInfo::getRegPressureSetLimit(const MachineFunction &MF,
|
|||
const int *Sets = getRegClassPressureSets(*I);
|
||||
assert(Sets);
|
||||
for (unsigned i = 0; Sets[i] != -1; ++i) {
|
||||
if (Sets[i] == (int)Idx)
|
||||
if (Sets[i] == (int)Idx)
|
||||
return Limit;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ computeTargetABI(const Triple &TT, StringRef CPU,
|
|||
if (TT.isOSNetBSD())
|
||||
TargetABI = ARMBaseTargetMachine::ARM_ABI_APCS;
|
||||
else
|
||||
TargetABI = ARMBaseTargetMachine::ARM_ABI_AAPCS;
|
||||
TargetABI = ARMBaseTargetMachine::ARM_ABI_AAPCS;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -234,8 +234,8 @@ void Thumb1FrameLowering::emitPrologue(MachineFunction &MF,
|
|||
|
||||
// Adjust FP so it point to the stack slot that contains the previous FP.
|
||||
if (HasFP) {
|
||||
FramePtrOffsetInBlock += MFI->getObjectOffset(FramePtrSpillFI)
|
||||
+ GPRCS1Size + ArgRegsSaveSize;
|
||||
FramePtrOffsetInBlock +=
|
||||
MFI->getObjectOffset(FramePtrSpillFI) + GPRCS1Size + ArgRegsSaveSize;
|
||||
AddDefaultPred(BuildMI(MBB, MBBI, dl, TII.get(ARM::tADDrSPi), FramePtr)
|
||||
.addReg(ARM::SP).addImm(FramePtrOffsetInBlock / 4)
|
||||
.setMIFlags(MachineInstr::FrameSetup));
|
||||
|
|
|
@ -305,13 +305,13 @@ unsigned PPCELFObjectWriter::GetRelocType(const MCValue &Target,
|
|||
break;
|
||||
case MCSymbolRefExpr::VK_GOT:
|
||||
Type = ELF::R_PPC64_GOT16_DS;
|
||||
break;
|
||||
break;
|
||||
case MCSymbolRefExpr::VK_PPC_GOT_LO:
|
||||
Type = ELF::R_PPC64_GOT16_LO_DS;
|
||||
break;
|
||||
case MCSymbolRefExpr::VK_PPC_TOC:
|
||||
Type = ELF::R_PPC64_TOC16_DS;
|
||||
break;
|
||||
break;
|
||||
case MCSymbolRefExpr::VK_PPC_TOC_LO:
|
||||
Type = ELF::R_PPC64_TOC16_LO_DS;
|
||||
break;
|
||||
|
@ -372,16 +372,16 @@ unsigned PPCELFObjectWriter::GetRelocType(const MCValue &Target,
|
|||
break;
|
||||
case MCSymbolRefExpr::VK_None:
|
||||
Type = ELF::R_PPC64_ADDR64;
|
||||
break;
|
||||
break;
|
||||
case MCSymbolRefExpr::VK_PPC_DTPMOD:
|
||||
Type = ELF::R_PPC64_DTPMOD64;
|
||||
break;
|
||||
break;
|
||||
case MCSymbolRefExpr::VK_PPC_TPREL:
|
||||
Type = ELF::R_PPC64_TPREL64;
|
||||
break;
|
||||
break;
|
||||
case MCSymbolRefExpr::VK_PPC_DTPREL:
|
||||
Type = ELF::R_PPC64_DTPREL64;
|
||||
break;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case FK_Data_4:
|
||||
|
|
|
@ -296,16 +296,16 @@ bool PPCAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
|
|||
}
|
||||
case 'U': // Print 'u' for update form.
|
||||
case 'X': // Print 'x' for indexed form.
|
||||
{
|
||||
// FIXME: Currently for PowerPC memory operands are always loaded
|
||||
// into a register, so we never get an update or indexed form.
|
||||
// This is bad even for offset forms, since even if we know we
|
||||
// have a value in -16(r1), we will generate a load into r<n>
|
||||
// and then load from 0(r<n>). Until that issue is fixed,
|
||||
// tolerate 'U' and 'X' but don't output anything.
|
||||
assert(MI->getOperand(OpNo).isReg());
|
||||
return false;
|
||||
}
|
||||
{
|
||||
// FIXME: Currently for PowerPC memory operands are always loaded
|
||||
// into a register, so we never get an update or indexed form.
|
||||
// This is bad even for offset forms, since even if we know we
|
||||
// have a value in -16(r1), we will generate a load into r<n>
|
||||
// and then load from 0(r<n>). Until that issue is fixed,
|
||||
// tolerate 'U' and 'X' but don't output anything.
|
||||
assert(MI->getOperand(OpNo).isReg());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1085,7 +1085,7 @@ void PPCLinuxAsmPrinter::EmitFunctionEntryLabel() {
|
|||
|
||||
if (!Subtarget->isPPC64()) {
|
||||
const PPCFunctionInfo *PPCFI = MF->getInfo<PPCFunctionInfo>();
|
||||
if (PPCFI->usesPICBase()) {
|
||||
if (PPCFI->usesPICBase()) {
|
||||
MCSymbol *RelocSymbol = PPCFI->getPICOffsetSymbol();
|
||||
MCSymbol *PICBase = MF->getPICBaseSymbol();
|
||||
OutStreamer->EmitLabel(RelocSymbol);
|
||||
|
|
|
@ -242,8 +242,8 @@ bool PPCCTRLoops::mightUseCTR(const Triple &TT, BasicBlock *BB) {
|
|||
// If we have a call to ppc_is_decremented_ctr_nonzero, or ppc_mtctr
|
||||
// we're definitely using CTR.
|
||||
case Intrinsic::ppc_is_decremented_ctr_nonzero:
|
||||
case Intrinsic::ppc_mtctr:
|
||||
return true;
|
||||
case Intrinsic::ppc_mtctr:
|
||||
return true;
|
||||
|
||||
// VisualStudio defines setjmp as _setjmp
|
||||
#if defined(_MSC_VER) && defined(setjmp) && \
|
||||
|
|
|
@ -5353,9 +5353,9 @@ PPCTargetLowering::LowerCall_64SVR4(SDValue Chain, SDValue Callee,
|
|||
PrepareTailCall(DAG, InFlag, Chain, dl, true, SPDiff, NumBytes, LROp,
|
||||
FPOp, true, TailCallArguments);
|
||||
|
||||
return FinishCall(CallConv, dl, isTailCall, isVarArg, IsPatchPoint,
|
||||
hasNest, DAG, RegsToPass, InFlag, Chain, CallSeqStart,
|
||||
Callee, SPDiff, NumBytes, Ins, InVals, CS);
|
||||
return FinishCall(CallConv, dl, isTailCall, isVarArg, IsPatchPoint, hasNest,
|
||||
DAG, RegsToPass, InFlag, Chain, CallSeqStart, Callee,
|
||||
SPDiff, NumBytes, Ins, InVals, CS);
|
||||
}
|
||||
|
||||
SDValue
|
||||
|
|
|
@ -610,11 +610,11 @@ void PPCRegisterInfo::lowerCRBitRestore(MachineBasicBlock::iterator II,
|
|||
|
||||
BuildMI(MBB, II, dl, TII.get(LP64 ? PPC::MTOCRF8 : PPC::MTOCRF),
|
||||
getCRFromCRBit(DestReg))
|
||||
.addReg(RegO, RegState::Kill)
|
||||
// Make sure we have a use dependency all the way through this
|
||||
// sequence of instructions. We can't have the other bits in the CR
|
||||
// modified in between the mfocrf and the mtocrf.
|
||||
.addReg(getCRFromCRBit(DestReg), RegState::Implicit);
|
||||
.addReg(RegO, RegState::Kill)
|
||||
// Make sure we have a use dependency all the way through this
|
||||
// sequence of instructions. We can't have the other bits in the CR
|
||||
// modified in between the mfocrf and the mtocrf.
|
||||
.addReg(getCRFromCRBit(DestReg), RegState::Implicit);
|
||||
|
||||
// Discard the pseudo instruction.
|
||||
MBB.erase(II);
|
||||
|
@ -673,9 +673,8 @@ void PPCRegisterInfo::lowerVRSAVERestore(MachineBasicBlock::iterator II,
|
|||
MBB.erase(II);
|
||||
}
|
||||
|
||||
bool
|
||||
PPCRegisterInfo::hasReservedSpillSlot(const MachineFunction &MF,
|
||||
unsigned Reg, int &FrameIdx) const {
|
||||
bool PPCRegisterInfo::hasReservedSpillSlot(const MachineFunction &MF,
|
||||
unsigned Reg, int &FrameIdx) const {
|
||||
const PPCSubtarget &Subtarget = MF.getSubtarget<PPCSubtarget>();
|
||||
// For the nonvolatile condition registers (CR2, CR3, CR4) in an SVR4
|
||||
// ABI, return true to prevent allocating an additional frame slot.
|
||||
|
|
|
@ -115,9 +115,9 @@ public:
|
|||
unsigned FrameIndex) const;
|
||||
|
||||
bool hasReservedSpillSlot(const MachineFunction &MF, unsigned Reg,
|
||||
int &FrameIdx) const override;
|
||||
void eliminateFrameIndex(MachineBasicBlock::iterator II,
|
||||
int SPAdj, unsigned FIOperandNum,
|
||||
int &FrameIdx) const override;
|
||||
void eliminateFrameIndex(MachineBasicBlock::iterator II, int SPAdj,
|
||||
unsigned FIOperandNum,
|
||||
RegScavenger *RS = nullptr) const override;
|
||||
|
||||
// Support for virtual base registers.
|
||||
|
|
|
@ -149,7 +149,7 @@ static PPCTargetMachine::PPCABI computeTargetABI(const Triple &TT,
|
|||
return PPCTargetMachine::PPC_ABI_ELFv2;
|
||||
|
||||
assert(Options.MCOptions.getABIName().empty() &&
|
||||
"Unknown target-abi option!");
|
||||
"Unknown target-abi option!");
|
||||
|
||||
if (!TT.isMacOSX()) {
|
||||
switch (TT.getArch()) {
|
||||
|
|
|
@ -186,12 +186,12 @@ protected:
|
|||
if (!KilledProdOp)
|
||||
continue;
|
||||
|
||||
// If the addend copy is used only by this MI, then the addend source
|
||||
// register is likely not live here. This could be fixed (based on the
|
||||
// legality checks above, the live range for the addend source register
|
||||
// could be extended), but it seems likely that such a trivial copy can
|
||||
// be coalesced away later, and thus is not worth the effort.
|
||||
if (TargetRegisterInfo::isVirtualRegister(AddendSrcReg) &&
|
||||
// If the addend copy is used only by this MI, then the addend source
|
||||
// register is likely not live here. This could be fixed (based on the
|
||||
// legality checks above, the live range for the addend source register
|
||||
// could be extended), but it seems likely that such a trivial copy can
|
||||
// be coalesced away later, and thus is not worth the effort.
|
||||
if (TargetRegisterInfo::isVirtualRegister(AddendSrcReg) &&
|
||||
!LIS->getInterval(AddendSrcReg).liveAt(FMAIdx))
|
||||
continue;
|
||||
|
||||
|
|
|
@ -226,7 +226,7 @@ extern "C" void LLVMInitializeSystemZTargetMC() {
|
|||
|
||||
// Register the MCCodeEmitter.
|
||||
TargetRegistry::RegisterMCCodeEmitter(TheSystemZTarget,
|
||||
createSystemZMCCodeEmitter);
|
||||
createSystemZMCCodeEmitter);
|
||||
|
||||
// Register the MCInstrInfo.
|
||||
TargetRegistry::RegisterMCInstrInfo(TheSystemZTarget,
|
||||
|
|
|
@ -2500,7 +2500,7 @@ SDValue SystemZTargetLowering::lowerTLSGetOffset(GlobalAddressSDNode *Node,
|
|||
}
|
||||
|
||||
SDValue SystemZTargetLowering::lowerGlobalTLSAddress(GlobalAddressSDNode *Node,
|
||||
SelectionDAG &DAG) const {
|
||||
SelectionDAG &DAG) const {
|
||||
if (DAG.getTarget().Options.EmulatedTLS)
|
||||
return LowerToTLSEmulatedModel(Node, DAG);
|
||||
SDLoc DL(Node);
|
||||
|
@ -2635,10 +2635,10 @@ SDValue SystemZTargetLowering::lowerConstantPool(ConstantPoolSDNode *CP,
|
|||
SDValue Result;
|
||||
if (CP->isMachineConstantPoolEntry())
|
||||
Result = DAG.getTargetConstantPool(CP->getMachineCPVal(), PtrVT,
|
||||
CP->getAlignment());
|
||||
CP->getAlignment());
|
||||
else
|
||||
Result = DAG.getTargetConstantPool(CP->getConstVal(), PtrVT,
|
||||
CP->getAlignment(), CP->getOffset());
|
||||
CP->getAlignment(), CP->getOffset());
|
||||
|
||||
// Use LARL to load the address of the constant pool entry.
|
||||
return DAG.getNode(SystemZISD::PCREL_WRAPPER, DL, PtrVT, Result);
|
||||
|
@ -3254,8 +3254,8 @@ SystemZTargetLowering::lowerINTRINSIC_WO_CHAIN(SDValue Op,
|
|||
if (Op->getNumValues() == 1)
|
||||
return CC;
|
||||
assert(Op->getNumValues() == 2 && "Expected a CC and non-CC result");
|
||||
return DAG.getNode(ISD::MERGE_VALUES, SDLoc(Op), Op->getVTList(),
|
||||
Glued, CC);
|
||||
return DAG.getNode(ISD::MERGE_VALUES, SDLoc(Op), Op->getVTList(), Glued,
|
||||
CC);
|
||||
}
|
||||
|
||||
unsigned Id = cast<ConstantSDNode>(Op.getOperand(0))->getZExtValue();
|
||||
|
@ -4211,7 +4211,7 @@ SystemZTargetLowering::lowerEXTRACT_VECTOR_ELT(SDValue Op,
|
|||
|
||||
SDValue
|
||||
SystemZTargetLowering::lowerExtendVectorInreg(SDValue Op, SelectionDAG &DAG,
|
||||
unsigned UnpackHigh) const {
|
||||
unsigned UnpackHigh) const {
|
||||
SDValue PackedOp = Op.getOperand(0);
|
||||
EVT OutVT = Op.getValueType();
|
||||
EVT InVT = PackedOp.getValueType();
|
||||
|
@ -4573,9 +4573,9 @@ SDValue SystemZTargetLowering::combineExtract(SDLoc DL, EVT ResVT, EVT VecVT,
|
|||
}
|
||||
return Op;
|
||||
} else if ((Opcode == ISD::SIGN_EXTEND_VECTOR_INREG ||
|
||||
Opcode == ISD::ZERO_EXTEND_VECTOR_INREG ||
|
||||
Opcode == ISD::ANY_EXTEND_VECTOR_INREG) &&
|
||||
canTreatAsByteVector(Op.getValueType()) &&
|
||||
Opcode == ISD::ZERO_EXTEND_VECTOR_INREG ||
|
||||
Opcode == ISD::ANY_EXTEND_VECTOR_INREG) &&
|
||||
canTreatAsByteVector(Op.getValueType()) &&
|
||||
canTreatAsByteVector(Op.getOperand(0).getValueType())) {
|
||||
// Make sure that only the unextended bits are significant.
|
||||
EVT ExtVT = Op.getValueType();
|
||||
|
@ -4586,14 +4586,14 @@ SDValue SystemZTargetLowering::combineExtract(SDLoc DL, EVT ResVT, EVT VecVT,
|
|||
unsigned SubByte = Byte % ExtBytesPerElement;
|
||||
unsigned MinSubByte = ExtBytesPerElement - OpBytesPerElement;
|
||||
if (SubByte < MinSubByte ||
|
||||
SubByte + BytesPerElement > ExtBytesPerElement)
|
||||
break;
|
||||
SubByte + BytesPerElement > ExtBytesPerElement)
|
||||
break;
|
||||
// Get the byte offset of the unextended element
|
||||
Byte = Byte / ExtBytesPerElement * OpBytesPerElement;
|
||||
// ...then add the byte offset relative to that element.
|
||||
Byte += SubByte - MinSubByte;
|
||||
if (Byte % BytesPerElement != 0)
|
||||
break;
|
||||
break;
|
||||
Op = Op.getOperand(0);
|
||||
Index = Byte / BytesPerElement;
|
||||
Force = true;
|
||||
|
|
|
@ -481,7 +481,7 @@ private:
|
|||
SDValue lowerINSERT_VECTOR_ELT(SDValue Op, SelectionDAG &DAG) const;
|
||||
SDValue lowerEXTRACT_VECTOR_ELT(SDValue Op, SelectionDAG &DAG) const;
|
||||
SDValue lowerExtendVectorInreg(SDValue Op, SelectionDAG &DAG,
|
||||
unsigned UnpackHigh) const;
|
||||
unsigned UnpackHigh) const;
|
||||
SDValue lowerShift(SDValue Op, SelectionDAG &DAG, unsigned ByScalar) const;
|
||||
|
||||
SDValue combineExtract(SDLoc DL, EVT ElemVT, EVT VecVT, SDValue OrigOp,
|
||||
|
|
|
@ -548,11 +548,10 @@ PredicateInstruction(MachineInstr *MI, ArrayRef<MachineOperand> Pred) const {
|
|||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
SystemZInstrInfo::copyPhysReg(MachineBasicBlock &MBB,
|
||||
MachineBasicBlock::iterator MBBI, DebugLoc DL,
|
||||
unsigned DestReg, unsigned SrcReg,
|
||||
bool KillSrc) const {
|
||||
void SystemZInstrInfo::copyPhysReg(MachineBasicBlock &MBB,
|
||||
MachineBasicBlock::iterator MBBI,
|
||||
DebugLoc DL, unsigned DestReg,
|
||||
unsigned SrcReg, bool KillSrc) const {
|
||||
// Split 128-bit GPR moves into two 64-bit moves. This handles ADDR128 too.
|
||||
if (SystemZ::GR128BitRegClass.contains(DestReg, SrcReg)) {
|
||||
copyPhysReg(MBB, MBBI, DL, RI.getSubReg(DestReg, SystemZ::subreg_h64),
|
||||
|
@ -590,13 +589,10 @@ SystemZInstrInfo::copyPhysReg(MachineBasicBlock &MBB,
|
|||
.addReg(SrcReg, getKillRegState(KillSrc));
|
||||
}
|
||||
|
||||
void
|
||||
SystemZInstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB,
|
||||
MachineBasicBlock::iterator MBBI,
|
||||
unsigned SrcReg, bool isKill,
|
||||
int FrameIdx,
|
||||
const TargetRegisterClass *RC,
|
||||
const TargetRegisterInfo *TRI) const {
|
||||
void SystemZInstrInfo::storeRegToStackSlot(
|
||||
MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, unsigned SrcReg,
|
||||
bool isKill, int FrameIdx, const TargetRegisterClass *RC,
|
||||
const TargetRegisterInfo *TRI) const {
|
||||
DebugLoc DL = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc();
|
||||
|
||||
// Callers may expect a single instruction, so keep 128-bit moves
|
||||
|
@ -604,15 +600,14 @@ SystemZInstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB,
|
|||
unsigned LoadOpcode, StoreOpcode;
|
||||
getLoadStoreOpcodes(RC, LoadOpcode, StoreOpcode);
|
||||
addFrameReference(BuildMI(MBB, MBBI, DL, get(StoreOpcode))
|
||||
.addReg(SrcReg, getKillRegState(isKill)), FrameIdx);
|
||||
.addReg(SrcReg, getKillRegState(isKill)),
|
||||
FrameIdx);
|
||||
}
|
||||
|
||||
void
|
||||
SystemZInstrInfo::loadRegFromStackSlot(MachineBasicBlock &MBB,
|
||||
MachineBasicBlock::iterator MBBI,
|
||||
unsigned DestReg, int FrameIdx,
|
||||
const TargetRegisterClass *RC,
|
||||
const TargetRegisterInfo *TRI) const {
|
||||
void SystemZInstrInfo::loadRegFromStackSlot(
|
||||
MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, unsigned DestReg,
|
||||
int FrameIdx, const TargetRegisterClass *RC,
|
||||
const TargetRegisterInfo *TRI) const {
|
||||
DebugLoc DL = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc();
|
||||
|
||||
// Callers may expect a single instruction, so keep 128-bit moves
|
||||
|
|
|
@ -856,7 +856,7 @@ public:
|
|||
MCContext &Ctx,
|
||||
MCStreamer &Out) override;
|
||||
void InstrumentMOVSImpl(unsigned AccessSize, MCContext &Ctx,
|
||||
MCStreamer &Out) override;
|
||||
MCStreamer &Out) override;
|
||||
|
||||
private:
|
||||
void EmitAdjustRSP(MCContext &Ctx, MCStreamer &Out, long Offset) {
|
||||
|
|
|
@ -1247,7 +1247,7 @@ bool X86AsmParser::ParseIntelExpression(IntelExprStateMachine &SM, SMLoc &End) {
|
|||
getContext().getDirectionalLocalSymbol(IntVal, IDVal == "b");
|
||||
MCSymbolRefExpr::VariantKind Variant = MCSymbolRefExpr::VK_None;
|
||||
const MCExpr *Val =
|
||||
MCSymbolRefExpr::create(Sym, Variant, getContext());
|
||||
MCSymbolRefExpr::create(Sym, Variant, getContext());
|
||||
if (IDVal == "b" && Sym->isUndefined())
|
||||
return Error(Loc, "invalid reference to undefined symbol");
|
||||
StringRef Identifier = Sym->getName();
|
||||
|
@ -1995,12 +1995,13 @@ std::unique_ptr<X86Operand> X86AsmParser::ParseMemOperand(unsigned SegReg,
|
|||
}
|
||||
|
||||
// Validate the scale amount.
|
||||
if (X86MCRegisterClasses[X86::GR16RegClassID].contains(BaseReg) &&
|
||||
if (X86MCRegisterClasses[X86::GR16RegClassID].contains(BaseReg) &&
|
||||
ScaleVal != 1) {
|
||||
Error(Loc, "scale factor in 16-bit address must be 1");
|
||||
return nullptr;
|
||||
}
|
||||
if (ScaleVal != 1 && ScaleVal != 2 && ScaleVal != 4 && ScaleVal != 8){
|
||||
}
|
||||
if (ScaleVal != 1 && ScaleVal != 2 && ScaleVal != 4 &&
|
||||
ScaleVal != 8) {
|
||||
Error(Loc, "scale factor in address must be 1, 2, 4 or 8");
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -22871,9 +22871,9 @@ static SDValue PerformEXTRACT_VECTOR_ELTCombine(SDNode *N, SelectionDAG &DAG,
|
|||
InputVector.getOpcode() == ISD::BITCAST &&
|
||||
dyn_cast<ConstantSDNode>(InputVector.getOperand(0))) {
|
||||
uint64_t ExtractedElt =
|
||||
cast<ConstantSDNode>(N->getOperand(1))->getZExtValue();
|
||||
cast<ConstantSDNode>(N->getOperand(1))->getZExtValue();
|
||||
uint64_t InputValue =
|
||||
cast<ConstantSDNode>(InputVector.getOperand(0))->getZExtValue();
|
||||
cast<ConstantSDNode>(InputVector.getOperand(0))->getZExtValue();
|
||||
uint64_t Res = (InputValue >> ExtractedElt) & 1;
|
||||
return DAG.getConstant(Res, dl, MVT::i1);
|
||||
}
|
||||
|
@ -24814,8 +24814,8 @@ static SDValue PerformMLOADCombine(SDNode *N, SelectionDAG &DAG,
|
|||
ShuffleVec[i] = i * SizeRatio;
|
||||
|
||||
// Can't shuffle using an illegal type.
|
||||
assert (DAG.getTargetLoweringInfo().isTypeLegal(WideVecVT)
|
||||
&& "WideVecVT should be legal");
|
||||
assert(DAG.getTargetLoweringInfo().isTypeLegal(WideVecVT) &&
|
||||
"WideVecVT should be legal");
|
||||
WideSrc0 = DAG.getVectorShuffle(WideVecVT, dl, WideSrc0,
|
||||
DAG.getUNDEF(WideVecVT), &ShuffleVec[0]);
|
||||
}
|
||||
|
@ -24906,8 +24906,8 @@ static SDValue PerformMSTORECombine(SDNode *N, SelectionDAG &DAG,
|
|||
ShuffleVec[i] = i * SizeRatio;
|
||||
|
||||
// Can't shuffle using an illegal type.
|
||||
assert (DAG.getTargetLoweringInfo().isTypeLegal(WideVecVT)
|
||||
&& "WideVecVT should be legal");
|
||||
assert(DAG.getTargetLoweringInfo().isTypeLegal(WideVecVT) &&
|
||||
"WideVecVT should be legal");
|
||||
|
||||
SDValue TruncatedVal = DAG.getVectorShuffle(WideVecVT, dl, WideVec,
|
||||
DAG.getUNDEF(WideVecVT),
|
||||
|
|
|
@ -232,7 +232,7 @@ void Float2Int::walkBackwards(const SmallPtrSetImpl<Instruction*> &Roots) {
|
|||
if (Instruction *OI = dyn_cast<Instruction>(O)) {
|
||||
// Unify def-use chains if they interfere.
|
||||
ECs.unionSets(I, OI);
|
||||
if (SeenInsts.find(I)->second != badRange())
|
||||
if (SeenInsts.find(I)->second != badRange())
|
||||
Worklist.push_back(OI);
|
||||
} else if (!isa<ConstantFP>(O)) {
|
||||
// Not an instruction or ConstantFP? we can't do anything.
|
||||
|
@ -304,7 +304,7 @@ void Float2Int::walkForwards() {
|
|||
for (Value *O : I->operands()) {
|
||||
if (Instruction *OI = dyn_cast<Instruction>(O)) {
|
||||
assert(SeenInsts.find(OI) != SeenInsts.end() &&
|
||||
"def not seen before use!");
|
||||
"def not seen before use!");
|
||||
OpRanges.push_back(SeenInsts.find(OI)->second);
|
||||
} else if (ConstantFP *CF = dyn_cast<ConstantFP>(O)) {
|
||||
// Work out if the floating point number can be losslessly represented
|
||||
|
@ -323,7 +323,7 @@ void Float2Int::walkForwards() {
|
|||
// we're in fast math mode.
|
||||
if (!F.isFinite() ||
|
||||
(F.isZero() && F.isNegative() && isa<FPMathOperator>(I) &&
|
||||
!I->hasNoSignedZeros())) {
|
||||
!I->hasNoSignedZeros())) {
|
||||
seen(I, badRange());
|
||||
Abort = true;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue