[llvm] [RISCV] Remove unneeded unmasked patterns for vcpop_v and riscv_vfirst_vl. (PR #127435)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 16 20:39:14 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-risc-v
Author: Craig Topper (topperc)
<details>
<summary>Changes</summary>
The pseudos have RISCVMaskedPseudo so I think we are able to convert the masked for to unmasked for automatically.
---
Full diff: https://github.com/llvm/llvm-project/pull/127435.diff
1 Files Affected:
- (modified) llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td (-8)
``````````diff
diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td b/llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
index c914dc2ffbcd3..ffa3d3982647d 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
@@ -2701,20 +2701,12 @@ foreach mti = AllMasks in {
VR:$rs, VR:$rs, GPR:$vl, mti.Log2SEW)>;
// 15.2 Vector count population in mask vcpop.m
- def : Pat<(XLenVT (riscv_vcpop_vl (mti.Mask VR:$rs2), (mti.Mask true_mask),
- VLOpFrag)),
- (!cast<Instruction>("PseudoVCPOP_M_" # mti.BX)
- VR:$rs2, GPR:$vl, mti.Log2SEW)>;
def : Pat<(XLenVT (riscv_vcpop_vl (mti.Mask VR:$rs2), (mti.Mask VMV0:$vm),
VLOpFrag)),
(!cast<Instruction>("PseudoVCPOP_M_" # mti.BX # "_MASK")
VR:$rs2, (mti.Mask VMV0:$vm), GPR:$vl, mti.Log2SEW)>;
// 15.3 vfirst find-first-set mask bit
- def : Pat<(XLenVT (riscv_vfirst_vl (mti.Mask VR:$rs2), (mti.Mask true_mask),
- VLOpFrag)),
- (!cast<Instruction>("PseudoVFIRST_M_" # mti.BX)
- VR:$rs2, GPR:$vl, mti.Log2SEW)>;
def : Pat<(XLenVT (riscv_vfirst_vl (mti.Mask VR:$rs2), (mti.Mask VMV0:$vm),
VLOpFrag)),
(!cast<Instruction>("PseudoVFIRST_M_" # mti.BX # "_MASK")
``````````
</details>
https://github.com/llvm/llvm-project/pull/127435
More information about the llvm-commits
mailing list