[PATCH] D25291: [AArch64] Optionally use the reciprocal estimation machinery
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 7 07:48:12 PDT 2016
spatel added a comment.
This patch mostly follows the existing pattern used by PPC and x86, so I have no objections. But I know there has been some controversy about the use of a CPU attribute as the enabling device. Someone from the AArch64 camp should comment on that. I don't know enough about the various CPU implementations to say whether there's a better way.
Note that in x86, the recent Intel FPUs are so fast that we have the opposite CPU attribute "FeatureFastScalarFSQRT" to turn *off* reciprocal codegen via the target hook isFsqrtCheap(). This may also be controversial (shouldn't these CPU-model-specific-transforms happen at the machine instruction level?), but there is a substantial precedent for fast/slow attributes used in the DAG as heuristics for isel.
================
Comment at: llvm/lib/Target/AArch64/AArch64.td:109-111
+def FeatureUseRSqrt : SubtargetFeature<
+ "use-reverse-square-root", "UseRSqrt", "true",
+ "Use the reverse square root approximation">;
----------------
reverse -> reciprocal ?
Repository:
rL LLVM
https://reviews.llvm.org/D25291
More information about the llvm-commits
mailing list