[PATCH] D123801: [DAG][PowerPC] Combine shuffle(bitcast(X), Mask) to bitcast(shuffle(X, Mask'))
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 2 07:31:58 PDT 2022
dmgreen added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:22001
+ NewMask.push_back(Base);
+ }
+
----------------
RKSimon wrote:
> If we moved scaleShuffleElements from X86ISelLowering.cpp inside ShuffleVectorSDNode as a static helper (like commuteMask) - could we reuse it here?
Long story short... yes I think it would work, but it handles the X86 specific SM_SentinelZero and the way undef is propagated is different. It could take extra args to specify those behaviours.
But then I found that llvm::widenShuffleMaskElts already does what we want here, so I've used that instead of this loop.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123801/new/
https://reviews.llvm.org/D123801
More information about the llvm-commits
mailing list