[PATCH] D86249: [llvm][sve] Make `llvm.masked.[gather|scatter]` legal for SVE.

Francesco Petrogalli via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 28 12:42:15 PDT 2020


fpetrogalli added inline comments.


================
Comment at: llvm/lib/CodeGen/ScalarizeMaskedMemIntrin.cpp:894
+      // would be required for scalarizing scalable vectors.
+      if (isa<ScalableVectorType>(LoadTy))
+        return false;
----------------
efriedma wrote:
> sdesmalen wrote:
> > Should this check be hoisted out of the switch statement and have it return false if the result or any of the operands to the intrinsic is scalable? The intrinsic itself doesn't really matter, given that the pass doesn't produce loops for any of the loads/stores of scalable vector types, not just gather/scatter.
> I doubt anyone is going to care about scalable masked_expandloads anytime soon, but sure, hosting it out makes sense.
Given that we know this pass doesn't produce loop, I am happy to hoist this even outside the `if (II)`, and test it on a generic `CallInst` instead of `IntrinsicInst`. Does that make sense? 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86249



More information about the llvm-commits mailing list