[llvm] [SDAG] Match BUILD_VECTOR in INSERT_SUBVECTOR to SPLAT_VECTOR fold (PR #163984)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 18 01:52:36 PDT 2025
================
@@ -8,7 +8,7 @@
define void @pr35443() {
; CHECK-LABEL: pr35443:
; CHECK: # %bb.0: # %entry
-; CHECK-NEXT: vpbroadcastb ac+4(%rip), %xmm0
+; CHECK-NEXT: vpbroadcastb ac+4(%rip), %ymm0
----------------
paulwalker-arm wrote:
I'm pretty sure we've tried this before with the same outcome, because the combine is removing potentially valuable information. I wonder if instead of removing it you can teach the relevant is_splat/get_splat functions that take allow_undefs like parameters to do a better job of this idiom for scalable vectors?
Same goes for matching splats during isel as most of the relevant patterns should just work by looking-through the insert_subvector.
https://github.com/llvm/llvm-project/pull/163984
More information about the llvm-commits
mailing list