[llvm] [RISCV][DAG][TLI] Avoid scalarizing length decreasing shuffles (PR #115532)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 19 10:50:52 PST 2024


================
@@ -4181,11 +4181,26 @@ void SelectionDAGBuilder::visitShuffleVector(const User &I) {
     return;
   }
 
-  // We can't use either concat vectors or extract subvectors so fall back to
+  // If the target prefers, emit a padded shuffle vector at the
+  // source operand width, then extract the original destination
+  // type.
+  if (!TLI.shouldScalarizeLengthDecreasingShuffle()) {
----------------
arsenm wrote:

SelectionDAGBuilder shouldn't be making transformations and should reliably translate what the IR was 

https://github.com/llvm/llvm-project/pull/115532


More information about the llvm-commits mailing list