[llvm] [RISCV] Improve lowering of spread(2) shuffles (PR #118658)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 4 12:19:51 PST 2024
================
@@ -5331,17 +5331,36 @@ static SDValue lowerVECTOR_SHUFFLE(SDValue Op, SelectionDAG &DAG,
// Extract the halves of the vectors.
MVT HalfVT = VT.getHalfNumVectorElementsVT();
+ // Recognize if one half is actually undef; the matching above will
+ // otherwise reuse the even stream for the undef one. This improves
+ // spread(2) shuffles.
+ bool EvenIsUndef = true, OddIsUndef = true;
----------------
preames wrote:
Seems reasonable to me, updating.
https://github.com/llvm/llvm-project/pull/118658
More information about the llvm-commits
mailing list