diff --git a/llvm/test/CodeGen/RISCV/rvv/rvv-peephole-vmerge-vops.ll b/llvm/test/CodeGen/RISCV/rvv/rvv-peephole-vmerge-vops.ll --- a/llvm/test/CodeGen/RISCV/rvv/rvv-peephole-vmerge-vops.ll +++ b/llvm/test/CodeGen/RISCV/rvv/rvv-peephole-vmerge-vops.ll @@ -960,8 +960,24 @@ ret void } +define @test_vaaddu( %var_11, i16 zeroext %var_9, %var_5, %var_0) { +; CHECK-LABEL: test_vaaddu: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: vsetivli zero, 3, e16, mf4, ta, mu +; CHECK-NEXT: csrwi vxrm, 0 +; CHECK-NEXT: vaaddu.vx v9, v8, a0, v0.t +; CHECK-NEXT: vmv1r.v v8, v9 +; CHECK-NEXT: ret +entry: + %0 = tail call @llvm.riscv.vaaddu.nxv1i16.i16.i64( poison, %var_11, i16 %var_9, i64 0, i64 3) + %1 = tail call @llvm.riscv.vmerge.nxv1i16.nxv1i16.i64( poison, %var_0, %0, %var_5, i64 3) + ret %1 +} + declare @llvm.riscv.vle.nxv32i16.i64(, * nocapture, i64) declare @llvm.riscv.vssubu.mask.nxv32i8.i8.i64(, , i8, , i64, i64 immarg) declare @llvm.riscv.vmseq.nxv32i8.nxv32i8.i64(, , i64) declare @llvm.riscv.vmerge.nxv32i16.nxv32i16.i64(, , , , i64) declare void @llvm.riscv.vse.nxv32i16.i64(, * nocapture, i64) +declare @llvm.riscv.vaaddu.nxv1i16.i16.i64(, , i16, i64 immarg, i64) +declare @llvm.riscv.vmerge.nxv1i16.nxv1i16.i64(, , , , i64)