[llvm] [AArch64] Let patterns for NEON instructions check runtime mode. (PR #95560)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 18 04:29:22 PDT 2024
================
@@ -6016,7 +6013,7 @@ def : Pat<(v2f64 (AArch64frsqrts (v2f64 FPR128:$Rn), (v2f64 FPR128:$Rm))),
// Some float -> int -> float conversion patterns for which we want to keep the
// int values in FP registers using the corresponding NEON instructions to
// avoid more costly int <-> fp register transfers.
-let Predicates = [HasNEON] in {
+let Predicates = [HasNEONandIsStreamingSafe] in {
----------------
paulwalker-arm wrote:
The predicate here doesn't match that used by the instruction's definition (e.g. `defm FCVTZS : ...`). This looks fine because those definitions don't include any patterns. However, that does suggest the `HasNEONandIsStreamingSafe` passed into some of those classes (e.g. `defm FRECPE : ...`) serves no purpose and can be removed rather than changed?
If you keep this change then please update the closing `}` comment because that still references `HasNEON`.
https://github.com/llvm/llvm-project/pull/95560
More information about the llvm-commits
mailing list