Skip to content

Commit 7c1ddcd

Browse files
authored
[RISCV] Remove isel patterns for riscv.vfmerge with vector-vector operands. (#101277)
The vfmerge intrinsic is only used by clang for vfmerge.vfm. vmerge.vvm for both int and float should use the llvm.vmerge intrinsic. This patch removes the vector-vector support for llvm.vfmerge and updates the tests to test what clang really uses.
1 parent 57acabb commit 7c1ddcd

File tree

3 files changed

+63
-68
lines changed

3 files changed

+63
-68
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7235,11 +7235,6 @@ foreach vti = AllFloatVectors in {
72357235
vti.Vector, vti.Vector, vti.Mask,
72367236
vti.Log2SEW, vti.LMul, vti.RegClass,
72377237
vti.RegClass, vti.RegClass>;
7238-
defm : VPatBinaryCarryInTAIL<"int_riscv_vfmerge", "PseudoVMERGE", "VVM",
7239-
vti.Vector,
7240-
vti.Vector, vti.Vector, vti.Mask,
7241-
vti.Log2SEW, vti.LMul, vti.RegClass,
7242-
vti.RegClass, vti.RegClass>;
72437238
defm : VPatBinaryCarryInTAIL<"int_riscv_vfmerge", "PseudoVFMERGE",
72447239
"V"#vti.ScalarSuffix#"M",
72457240
vti.Vector,

llvm/test/CodeGen/RISCV/rvv/unmasked-tu.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2576,21 +2576,21 @@ entry:
25762576
ret <vscale x 8 x double> %a
25772577
}
25782578

2579-
declare <vscale x 1 x half> @llvm.riscv.vfmerge.nxv1f16.nxv1f16(
2579+
declare <vscale x 1 x half> @llvm.riscv.vmerge.nxv1f16.nxv1f16(
25802580
<vscale x 1 x half>,
25812581
<vscale x 1 x half>,
25822582
<vscale x 1 x half>,
25832583
<vscale x 1 x i1>,
25842584
iXLen);
25852585

2586-
define <vscale x 1 x half> @intrinsic_vfmerge_vvm_nxv1f16_nxv1f16_nxv1f16(<vscale x 1 x half> %0, <vscale x 1 x half> %1, <vscale x 1 x half> %2, <vscale x 1 x i1> %3, iXLen %4) nounwind {
2587-
; CHECK-LABEL: intrinsic_vfmerge_vvm_nxv1f16_nxv1f16_nxv1f16:
2586+
define <vscale x 1 x half> @intrinsic_vmerge_vvm_nxv1f16_nxv1f16_nxv1f16(<vscale x 1 x half> %0, <vscale x 1 x half> %1, <vscale x 1 x half> %2, <vscale x 1 x i1> %3, iXLen %4) nounwind {
2587+
; CHECK-LABEL: intrinsic_vmerge_vvm_nxv1f16_nxv1f16_nxv1f16:
25882588
; CHECK: # %bb.0: # %entry
25892589
; CHECK-NEXT: vsetvli zero, a0, e16, mf4, tu, ma
25902590
; CHECK-NEXT: vmerge.vvm v8, v9, v10, v0
25912591
; CHECK-NEXT: ret
25922592
entry:
2593-
%a = call <vscale x 1 x half> @llvm.riscv.vfmerge.nxv1f16.nxv1f16(
2593+
%a = call <vscale x 1 x half> @llvm.riscv.vmerge.nxv1f16.nxv1f16(
25942594
<vscale x 1 x half> %0,
25952595
<vscale x 1 x half> %1,
25962596
<vscale x 1 x half> %2,

0 commit comments

Comments
 (0)