[llvm] [VectorCombine] Fold deinterleave2 with smaller effective element size (PR #192121)
Min-Yih Hsu via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 14 18:50:10 PDT 2026
================
@@ -0,0 +1,122 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6
+; RUN: opt -S -mtriple=riscv64 -mcpu=sifive-p470 -p vector-combine < %s | FileCheck %s
+
+define void @narrow_deinterleave2(ptr %p, ptr %out, i32 %evl) {
+; CHECK-LABEL: define void @narrow_deinterleave2(
+; CHECK-SAME: ptr [[P:%.*]], ptr [[OUT:%.*]], i32 [[EVL:%.*]]) #[[ATTR0:[0-9]+]] {
+; CHECK-NEXT: [[WIDE_VP_LOAD:%.*]] = tail call <vscale x 16 x i32> @llvm.vp.load.nxv16i32.p0(ptr align 4 [[P]], <vscale x 16 x i1> splat (i1 true), i32 [[EVL]])
+; CHECK-NEXT: [[TMP1:%.*]] = bitcast <vscale x 16 x i32> [[WIDE_VP_LOAD]] to <vscale x 32 x i16>
----------------
mshockwave wrote:
I believe bitcast could be folded into vp.load here: #192173
https://github.com/llvm/llvm-project/pull/192121
More information about the llvm-commits
mailing list