summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorHaicheng Wu <haicheng@codeaurora.org>2016-07-12 15:31:41 +0000
committerHaicheng Wu <haicheng@codeaurora.org>2016-07-12 15:31:41 +0000
commit711ca868fce9ae6ffa7a5f26cc73e9d8dad8857d (patch)
tree5cdcb22713a6554157784ce4f039a8fec13f70f7 /llvm/lib
parentced86bf736631235e4607b76bc4d186f58925ecc (diff)
downloadbcm5719-llvm-711ca868fce9ae6ffa7a5f26cc73e9d8dad8857d.tar.gz
bcm5719-llvm-711ca868fce9ae6ffa7a5f26cc73e9d8dad8857d.zip
[AArch64] Set FMOVS0 and FMOVD0 as isAsCheapAsAMove when needed.
If a subtarget has both ZCZeroing and CustomCheapAsMoveHandling features (now only Kryo has both), set FMOVS0 and FMOVD0 isAsCheapAsAMove. Differential Revision: http://reviews.llvm.org/D22256 llvm-svn: 275178
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/AArch64/AArch64InstrInfo.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
index f5a5dd5894a..de881e75ce4 100644
--- a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+++ b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
@@ -620,6 +620,12 @@ bool AArch64InstrInfo::isAsCheapAsAMove(const MachineInstr &MI) const {
return canBeExpandedToORR(MI, 32);
case AArch64::MOVi64imm:
return canBeExpandedToORR(MI, 64);
+
+ // It is cheap to move #0 to float registers if the subtarget has
+ // ZeroCycleZeroing feature.
+ case AArch64::FMOVS0:
+ case AArch64::FMOVD0:
+ return Subtarget.hasZeroCycleZeroing();
}
llvm_unreachable("Unknown opcode to check as cheap as a move!");
OpenPOWER on IntegriCloud