[llvm] [RISCV][ISel] Fold trunc (lshr (add (zext X), (zext Y)), 1) -> vaaddu X, Y (PR #76550)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 8 02:28:53 PST 2024
================
----------------
lukel97 wrote:
Can we add some tests for vaaddu.vx? Something like
```llvm
define <vscale x 8 x i8> @vaaddu_vx_nxv8i8(<vscale x 8 x i8> %x, i8 %y) {
%xzv = zext <vscale x 8 x i8> %x to <vscale x 8 x i16>
%yhead = insertelement <vscale x 8 x i8> poison, i8 %y, i32 0
%ysplat = shufflevector <vscale x 8 x i8> %yhead, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
%yzv = zext <vscale x 8 x i8> %ysplat to <vscale x 8 x i16>
...
}
```
https://github.com/llvm/llvm-project/pull/76550
More information about the llvm-commits
mailing list