[PATCH] D22256: [AArch64] Set FMOVS0 and FMOVD0 as isAsCheapAsAMove when needed.
Haicheng Wu via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 12 08:39:06 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL275178: [AArch64] Set FMOVS0 and FMOVD0 as isAsCheapAsAMove when needed. (authored by haicheng).
Changed prior to commit:
http://reviews.llvm.org/D22256?vs=63637&id=63686#toc
Repository:
rL LLVM
http://reviews.llvm.org/D22256
Files:
llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.cpp
llvm/trunk/test/CodeGen/AArch64/arm64-zero-cycle-zeroing.ll
Index: llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.cpp
===================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.cpp
+++ llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.cpp
@@ -620,6 +620,12 @@
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!");
Index: llvm/trunk/test/CodeGen/AArch64/arm64-zero-cycle-zeroing.ll
===================================================================
--- llvm/trunk/test/CodeGen/AArch64/arm64-zero-cycle-zeroing.ll
+++ llvm/trunk/test/CodeGen/AArch64/arm64-zero-cycle-zeroing.ll
@@ -13,9 +13,9 @@
; CYCLONE: movi.2d v2, #0000000000000000
; CYCLONE: movi.2d v3, #0000000000000000
; KRYO: movi v0.2d, #0000000000000000
-; KRYO: mov v1.16b, v0.16b
-; KRYO: mov v2.16b, v0.16b
-; KRYO: mov v3.16b, v0.16b
+; KRYO: movi v1.2d, #0000000000000000
+; KRYO: movi v2.2d, #0000000000000000
+; KRYO: movi v3.2d, #0000000000000000
tail call void @bar(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00) nounwind
ret void
}
@@ -46,7 +46,7 @@
; CYCLONE: movi.2d v0, #0000000000000000
; CYCLONE: movi.2d v1, #0000000000000000
; KRYO: movi v0.2d, #0000000000000000
-; KRYO: mov v1.16b, v0.16b
+; KRYO: movi v1.2d, #0000000000000000
tail call void @barf(float 0.000000e+00, float 0.000000e+00) nounwind
ret void
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22256.63686.patch
Type: text/x-patch
Size: 1673 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160712/4fd83c30/attachment.bin>
More information about the llvm-commits
mailing list