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

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 1 02:51:24 PDT 2020


sdesmalen added a comment.

> [llvm][sve] Make `llvm.masked.[gather|scatter]` legal for SVE.

The title of the patch seems wrong, as this patch doesn't do any legalization of masked.gather/scatter for SVE?



================
Comment at: llvm/lib/CodeGen/ScalarizeMaskedMemIntrin.cpp:894
+      // would be required for scalarizing scalable vectors.
+      if (isa<ScalableVectorType>(LoadTy))
+        return false;
----------------
fpetrogalli wrote:
> 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? 
Sure, that sounds fine.


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