mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Move subtarget check upper for NEON reg-reg fixup pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85914 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ec8e1b709e
commit
747409a290
@ -115,7 +115,8 @@ bool ARMBaseTargetMachine::addPreEmitPass(PassManagerBase &PM,
|
||||
if (OptLevel != CodeGenOpt::None) {
|
||||
if (!Subtarget.isThumb1Only())
|
||||
PM.add(createIfConverterPass());
|
||||
PM.add(createNEONMoveFixPass());
|
||||
if (Subtarget.hasNEON())
|
||||
PM.add(createNEONMoveFixPass());
|
||||
}
|
||||
|
||||
if (Subtarget.isThumb2()) {
|
||||
|
@ -35,7 +35,6 @@ namespace {
|
||||
private:
|
||||
const TargetRegisterInfo *TRI;
|
||||
const ARMBaseInstrInfo *TII;
|
||||
const ARMSubtarget *Subtarget;
|
||||
|
||||
typedef DenseMap<unsigned, const MachineInstr*> RegMap;
|
||||
|
||||
@ -71,7 +70,7 @@ bool NEONMoveFixPass::InsertMoves(MachineBasicBlock &MBB) {
|
||||
Domain = ARMII::DomainNEON;
|
||||
}
|
||||
|
||||
if ((Domain & ARMII::DomainNEON) && Subtarget->hasNEON()) {
|
||||
if (Domain & ARMII::DomainNEON) {
|
||||
// Convert FCPYD to VMOVD.
|
||||
unsigned DestReg = MI->getOperand(0).getReg();
|
||||
|
||||
@ -93,8 +92,7 @@ bool NEONMoveFixPass::InsertMoves(MachineBasicBlock &MBB) {
|
||||
Modified = true;
|
||||
++NumVMovs;
|
||||
} else {
|
||||
assert((Domain & ARMII::DomainVFP ||
|
||||
!Subtarget->hasNEON()) && "Invalid domain!");
|
||||
assert((Domain & ARMII::DomainVFP) && "Invalid domain!");
|
||||
// Do nothing.
|
||||
}
|
||||
}
|
||||
@ -124,7 +122,6 @@ bool NEONMoveFixPass::runOnMachineFunction(MachineFunction &Fn) {
|
||||
return false;
|
||||
|
||||
TRI = TM.getRegisterInfo();
|
||||
Subtarget = &TM.getSubtarget<ARMSubtarget>();
|
||||
TII = static_cast<const ARMBaseInstrInfo*>(TM.getInstrInfo());
|
||||
|
||||
bool Modified = false;
|
||||
|
Loading…
Reference in New Issue
Block a user