[PATCH] D137341: [VectorCombine] widen a load with subvector insert

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 6 07:58:00 PST 2022


spatel planned changes to this revision.
spatel marked an inline comment as done.
spatel added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/VectorCombine.cpp:279
+
+  auto *Load = dyn_cast<LoadInst>(Shuf->getOperand(0));
+  if (!canWidenLoad(Load, TTI))
----------------
RKSimon wrote:
> Do we need to check for cases where the identity comes from the second operand? IIRC we got burnt by something similar recently.
Good catch. If we have a very non-canonical shuffle where both operands are valid loads, but we're actually only shuffling elements from op1 (op0 is unused), this would use the wrong operand.


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

https://reviews.llvm.org/D137341



More information about the llvm-commits mailing list