Skip to content

Conversation

@topperc
Copy link
Collaborator

@topperc topperc commented Oct 18, 2025

vfmerge isn't a valid instruction for Zvfbfmin. These look to have been mistakenly added as part of Zvfbfa.

vfmerge isn't a valid instruction for Zvfbfmin. These look to have
been mistakenly added as part of Zvfbfa.
@llvmbot
Copy link
Member

llvmbot commented Oct 18, 2025

@llvm/pr-subscribers-backend-risc-v

Author: Craig Topper (topperc)

Changes

vfmerge isn't a valid instruction for Zvfbfmin. These look to have been mistakenly added as part of Zvfbfa.


Full diff: https://github.com/llvm/llvm-project/pull/164105.diff

1 Files Affected:

  • (modified) llvm/lib/Target/RISCV/RISCVInstrInfoZvfbf.td (-32)
diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoZvfbf.td b/llvm/lib/Target/RISCV/RISCVInstrInfoZvfbf.td
index 9358486c13da2..32bc63c482ed2 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfoZvfbf.td
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfoZvfbf.td
@@ -453,19 +453,6 @@ let Predicates = [HasStdExtZvfbfmin] in {
                                  fvti.Vector, fvti.Vector, fvti.Mask,
                                  fvti.Log2SEW, fvti.LMul, fvti.RegClass,
                                  fvti.RegClass, fvti.RegClass>;
-    defm : VPatBinaryCarryInTAIL<"int_riscv_vfmerge", "PseudoVFMERGE",
-                                 "V"#fvti.ScalarSuffix#"M",
-                                 fvti.Vector,
-                                 fvti.Vector, fvti.Scalar, fvti.Mask,
-                                 fvti.Log2SEW, fvti.LMul, fvti.RegClass,
-                                 fvti.RegClass, fvti.ScalarRegClass>;
-    defvar instr = !cast<Instruction>("PseudoVMERGE_VIM_"#fvti.LMul.MX);
-    def : Pat<(fvti.Vector (int_riscv_vfmerge (fvti.Vector fvti.RegClass:$passthru),
-                                              (fvti.Vector fvti.RegClass:$rs2),
-                                              (fvti.Scalar (fpimm0)),
-                                              (fvti.Mask VMV0:$vm), VLOpFrag)),
-              (instr fvti.RegClass:$passthru, fvti.RegClass:$rs2, 0,
-                     (fvti.Mask VMV0:$vm), GPR:$vl, fvti.Log2SEW)>;
 
     defvar ivti = GetIntVTypeInfo<fvti>.Vti;
     def : Pat<(fvti.Vector (vselect (fvti.Mask VMV0:$vm), fvti.RegClass:$rs1,
@@ -489,15 +476,6 @@ let Predicates = [HasStdExtZvfbfmin] in {
                    (fvti.Vector (IMPLICIT_DEF)),
                    fvti.RegClass:$rs2, 0, (fvti.Mask VMV0:$vm), fvti.AVL, fvti.Log2SEW)>;
 
-    def : Pat<(fvti.Vector (vselect (fvti.Mask VMV0:$vm),
-                                    (SplatFPOp fvti.ScalarRegClass:$rs1),
-                                    fvti.RegClass:$rs2)),
-              (!cast<Instruction>("PseudoVFMERGE_V"#fvti.ScalarSuffix#"M_"#fvti.LMul.MX)
-                   (fvti.Vector (IMPLICIT_DEF)),
-                   fvti.RegClass:$rs2,
-                   (fvti.Scalar fvti.ScalarRegClass:$rs1),
-                   (fvti.Mask VMV0:$vm), fvti.AVL, fvti.Log2SEW)>;
-
     def : Pat<(fvti.Vector (riscv_vmerge_vl (fvti.Mask VMV0:$vm),
                                             fvti.RegClass:$rs1,
                                             fvti.RegClass:$rs2,
@@ -526,16 +504,6 @@ let Predicates = [HasStdExtZvfbfmin] in {
                    fvti.RegClass:$passthru, fvti.RegClass:$rs2, 0, (fvti.Mask VMV0:$vm),
                    GPR:$vl, fvti.Log2SEW)>;
 
-    def : Pat<(fvti.Vector (riscv_vmerge_vl (fvti.Mask VMV0:$vm),
-                                            (SplatFPOp fvti.ScalarRegClass:$rs1),
-                                            fvti.RegClass:$rs2,
-                                            fvti.RegClass:$passthru,
-                                            VLOpFrag)),
-              (!cast<Instruction>("PseudoVFMERGE_V"#fvti.ScalarSuffix#"M_"#fvti.LMul.MX)
-                   fvti.RegClass:$passthru, fvti.RegClass:$rs2,
-                   (fvti.Scalar fvti.ScalarRegClass:$rs1),
-                   (fvti.Mask VMV0:$vm), GPR:$vl, fvti.Log2SEW)>;
-
     def : Pat<(fvti.Vector
                (riscv_vrgather_vv_vl fvti.RegClass:$rs2,
                                      (ivti.Vector fvti.RegClass:$rs1),

Copy link
Member

@4vtomat 4vtomat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@topperc topperc merged commit aa70f66 into llvm:main Oct 19, 2025
12 checks passed
@topperc topperc deleted the pr/vfmerge branch October 19, 2025 16:27
Lukacma pushed a commit to Lukacma/llvm-project that referenced this pull request Oct 29, 2025
…164105)

vfmerge isn't a valid instruction for Zvfbfmin. These look to have been
mistakenly added as part of Zvfbfa.
aokblast pushed a commit to aokblast/llvm-project that referenced this pull request Oct 30, 2025
…164105)

vfmerge isn't a valid instruction for Zvfbfmin. These look to have been
mistakenly added as part of Zvfbfa.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants