[llvm] 250812a - Remove a reference to rdar://problem/16473581
Jon Roelofs via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 9 16:09:39 PDT 2023
Author: Jon Roelofs
Date: 2023-08-09T16:09:27-07:00
New Revision: 250812abe7334c95d4bfb3738e3646cc7f216aa1
URL: https://github.com/llvm/llvm-project/commit/250812abe7334c95d4bfb3738e3646cc7f216aa1
DIFF: https://github.com/llvm/llvm-project/commit/250812abe7334c95d4bfb3738e3646cc7f216aa1.diff
LOG: Remove a reference to rdar://problem/16473581
Readers can git-blame and find the necessary context if absolutely needed.
Otherwise, the presence of the link doesn't provide much value.
Moral of the story: don't emit `movi.2d #0` on any target affected by this.
Added:
Modified:
llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp b/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
index 76f1cc782b2488..0dc32b618787d5 100644
--- a/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
+++ b/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
@@ -1453,8 +1453,13 @@ void AArch64AsmPrinter::emitInstruction(const MachineInstr *MI) {
return;
}
case AArch64::MOVIv2d_ns:
- // If the target has <rdar://problem/16473581>, lower this
- // instruction to movi.16b instead.
+ // It is generally beneficial to rewrite "fmov s0, wzr" to "movi d0, #0".
+ // as movi is more efficient across all cores. Newer cores can eliminate
+ // fmovs early and there is no
diff erence with movi, but this not true for
+ // all implementations.
+ //
+ // The floating-point version doesn't quite work in rare cases on older
+ // CPUs, so on those targets we lower this instruction to movi.16b instead.
if (STI->hasZeroCycleZeroingFPWorkaround() &&
MI->getOperand(1).getImm() == 0) {
MCInst TmpInst;
More information about the llvm-commits
mailing list