[llvm] [VectorCombine] Fold vector.interleave2 with two constant splats (PR #125144)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 30 18:34:13 PST 2025
================
@@ -3145,6 +3146,45 @@ bool VectorCombine::foldInsExtVectorToShuffle(Instruction &I) {
return true;
}
+bool VectorCombine::foldInterleaveIntrinsics(Instruction &I) {
+ // If we're interleaving 2 constant splats, for instance `<vscale x 8 x i32>
+ // <splat of 666>` and `<vscale x 8 x i32> <splat of 777>`, we can create a
+ // larger splat
+ // `<vscale x 8 x i64> <splat of ((777 << 32) | 666)>` first before casting it
+ // back into `<vscale x 16 x i32>`.
----------------
lukel97 wrote:
Nit, make this a doc comment by moving above the signature + use ///
https://github.com/llvm/llvm-project/pull/125144
More information about the llvm-commits
mailing list