[PATCH] D117871: [AArch64][CodeGen] Always use SVE (when enabled) to lower integer divides

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 21 04:42:24 PST 2022


paulwalker-arm added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:11086
 
-  if (useSVEForFixedLengthVectorVT(VT, /*OverrideNEON=*/true))
+  if (useSVEForFixedLengthVectorVT(VT, NeonOverride::Always))
     return LowerFixedLengthVectorIntDivideToSVE(Op, DAG);
----------------
Here I think `VT.isFixedLengthVector() && hasSVE()` is all you need.  This is operation legalisation so the types must already be legal.  The current `useSVEForFixedLengthVectorVT` call exists purely to prevent the one case you no longer want to prevent.



================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.h:489-493
+enum class NeonOverride {
+  Never,
+  OnlyIfSVEGreaterThan128Bits,
+  Always,
+};
----------------
My immediate reaction is that I'm not sure this enum is required.  It exists so that you can pass `Always` to `useSVEForFixedLengthVectorVT` but under those circumstances I don't believe there's a need to ever call `useSVEForFixedLengthVectorVT`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117871/new/

https://reviews.llvm.org/D117871



More information about the llvm-commits mailing list