mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
Change the NEON VDUPfdf and VDUPfqf pseudo-instructions to actually be
pseudo instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115840 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cdce44be47
commit
65dc30340c
@ -17,6 +17,7 @@
|
||||
#define DEBUG_TYPE "arm-pseudo"
|
||||
#include "ARM.h"
|
||||
#include "ARMBaseInstrInfo.h"
|
||||
#include "ARMRegisterInfo.h"
|
||||
#include "llvm/CodeGen/MachineFunctionPass.h"
|
||||
#include "llvm/CodeGen/MachineInstrBuilder.h"
|
||||
#include "llvm/Target/TargetRegisterInfo.h"
|
||||
@ -710,6 +711,31 @@ bool ARMExpandPseudo::ExpandMBB(MachineBasicBlock &MBB) {
|
||||
MI.eraseFromParent();
|
||||
break;
|
||||
}
|
||||
case ARM::VDUPfqf:
|
||||
case ARM::VDUPfdf:{
|
||||
unsigned NewOpc = Opcode == ARM::VDUPfqf ? ARM::VDUPLNfq : ARM::VDUPLNfd;
|
||||
MachineInstrBuilder MIB =
|
||||
BuildMI(MBB, MBBI, MI.getDebugLoc(), TII->get(NewOpc));
|
||||
unsigned OpIdx = 0;
|
||||
unsigned SrcReg = MI.getOperand(1).getReg();
|
||||
unsigned Lane = getARMRegisterNumbering(SrcReg) & 1;
|
||||
unsigned DReg = TRI->getMatchingSuperReg(SrcReg,
|
||||
Lane & 1 ? ARM::ssub_1 : ARM::ssub_0, &ARM::DPR_VFP2RegClass);
|
||||
// The lane is [0,1] for the containing DReg superregister.
|
||||
// Copy the dst/src register operands.
|
||||
MIB.addOperand(MI.getOperand(OpIdx++));
|
||||
MIB.addReg(DReg);
|
||||
++OpIdx;
|
||||
// Add the lane select operand.
|
||||
MIB.addImm(Lane);
|
||||
// Add the predicate operands.
|
||||
MIB.addOperand(MI.getOperand(OpIdx++));
|
||||
MIB.addOperand(MI.getOperand(OpIdx++));
|
||||
|
||||
TransferImpOps(MI, MIB, MIB);
|
||||
MI.eraseFromParent();
|
||||
break;
|
||||
}
|
||||
|
||||
case ARM::VLD1q8Pseudo:
|
||||
case ARM::VLD1q16Pseudo:
|
||||
|
@ -3609,14 +3609,9 @@ def : Pat<(v4f32 (NEONvduplane (v4f32 QPR:$src), imm:$lane)),
|
||||
(DSubReg_i32_reg imm:$lane))),
|
||||
(SubReg_i32_lane imm:$lane)))>;
|
||||
|
||||
def VDUPfdf : N2V<0b11, 0b11, {?,1}, {0,0}, 0b11000, 0, 0,
|
||||
(outs DPR:$dst), (ins SPR:$src),
|
||||
IIC_VMOVD, "vdup", "32", "$dst, ${src:lane}", "",
|
||||
def VDUPfdf : PseudoNeonI<(outs DPR:$dst), (ins SPR:$src), IIC_VMOVD, "",
|
||||
[(set DPR:$dst, (v2f32 (NEONvdup (f32 SPR:$src))))]>;
|
||||
|
||||
def VDUPfqf : N2V<0b11, 0b11, {?,1}, {0,0}, 0b11000, 1, 0,
|
||||
(outs QPR:$dst), (ins SPR:$src),
|
||||
IIC_VMOVQ, "vdup", "32", "$dst, ${src:lane}", "",
|
||||
def VDUPfqf : PseudoNeonI<(outs QPR:$dst), (ins SPR:$src), IIC_VMOVD, "",
|
||||
[(set QPR:$dst, (v4f32 (NEONvdup (f32 SPR:$src))))]>;
|
||||
|
||||
// VMOVN : Vector Narrowing Move
|
||||
|
Loading…
Reference in New Issue
Block a user