[PATCH] D72451: [ARM][MVE] Enable extending gathers

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 16 02:08:24 PST 2020


dmgreen accepted this revision.
dmgreen added a comment.
This revision is now accepted and ready to land.

LGTM. Thanks



================
Comment at: llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp:249
+  unsigned Unsigned = 1;
+  // If this is an extending gather, a SExt or ZExt must be following
+  auto *Extend = Root;
----------------
Can you add a comment saying something like "we have already checked the size of the gather in isLegalTypeAndAlignment, and need to check that the extend is to a full vector width."


================
Comment at: llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp:258
+    // instruction which extends it
+    Extend = dyn_cast<Instruction>(*I->users().begin());
+    if (isa<SExtInst>(Extend)) {
----------------
This can just be a cast<Instruction>. The dynamic part should never fail (and the cast<..> will check that).


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

https://reviews.llvm.org/D72451





More information about the llvm-commits mailing list