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 | 6e73761dc8af64835998943b137abddd8bb43474 (patch) | |
| tree | f48fd87f83f90d2ddf48f5231945b3f271bfaadb /llvm/lib/Target/AArch64/AArch64InstrInfo.cpp | |
| parent | 0a43c2c393fb123d4f70a05dfea8fcdebcac873d (diff) | |
| download | bcm5719-llvm-6e73761dc8af64835998943b137abddd8bb43474.tar.gz bcm5719-llvm-6e73761dc8af64835998943b137abddd8bb43474.zip | |
[AArch64]Implement the copy of two FPR8 registers by using FMOVss of two FPR32 registers in copyPhysReg.
llvm-svn: 201061
Diffstat (limited to 'llvm/lib/Target/AArch64/AArch64InstrInfo.cpp')
| -rw-r--r-- | llvm/lib/Target/AArch64/AArch64InstrInfo.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp index ba185a436f1..9c27f82d2b3 100644 --- a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp +++ b/llvm/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(); |

