diff options
author | Hao Liu <Hao.Liu@arm.com> | 2014-02-10 03:16:22 +0000 |
---|---|---|
committer | Hao Liu <Hao.Liu@arm.com> | 2014-02-10 03:16:22 +0000 |
commit | 2825b8f0ea989e0d50f4287970f1461a1050ffb5 (patch) | |
tree | bfcf7a053858a63b0df103de96d66960395ae7d8 /lib/Target | |
parent | a73f0e2d4928675c5969324f3bb14717987556a8 (diff) | |
download | llvm-2825b8f0ea989e0d50f4287970f1461a1050ffb5.tar.gz llvm-2825b8f0ea989e0d50f4287970f1461a1050ffb5.tar.bz2 llvm-2825b8f0ea989e0d50f4287970f1461a1050ffb5.tar.xz |
[AArch64]Implement the copy of two FPR8 registers by using FMOVss of two FPR32 registers in copyPhysReg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201061 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/AArch64/AArch64InstrInfo.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Target/AArch64/AArch64InstrInfo.cpp b/lib/Target/AArch64/AArch64InstrInfo.cpp index ba185a436f..9c27f82d2b 100644 --- a/lib/Target/AArch64/AArch64InstrInfo.cpp +++ b/lib/Target/AArch64/AArch64InstrInfo.cpp @@ -132,6 +132,16 @@ void AArch64InstrInfo::copyPhysReg(MachineBasicBlock &MBB, .addImm(16); return; } + } else if (AArch64::FPR8RegClass.contains(DestReg, SrcReg)) { + // The copy of two FPR8 registers is implemented by the copy of two FPR32 + const TargetRegisterInfo *TRI = &getRegisterInfo(); + unsigned Dst = TRI->getMatchingSuperReg(DestReg, AArch64::sub_8, + &AArch64::FPR32RegClass); + unsigned Src = TRI->getMatchingSuperReg(SrcReg, AArch64::sub_8, + &AArch64::FPR32RegClass); + BuildMI(MBB, I, DL, get(AArch64::FMOVss), Dst) + .addReg(Src); + return; } else if (AArch64::FPR16RegClass.contains(DestReg, SrcReg)) { // The copy of two FPR16 registers is implemented by the copy of two FPR32 const TargetRegisterInfo *TRI = &getRegisterInfo(); |