Skip to content

Commit 540ce31

Browse files
author
Yeting Kuo
committed
Use getRVVMCOpcode to avoid list all pseduo instruction.
1 parent a14c83a commit 540ce31

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3502,17 +3502,9 @@ bool RISCVDAGToDAGISel::performCombineVMergeAndVOps(SDNode *N) {
35023502
return false;
35033503

35043504
// This transformation is illegal for viota.m when Mask is not a true mask.
3505-
switch (True->getMachineOpcode()) {
3506-
case RISCV::PseudoVIOTA_M_MF8:
3507-
case RISCV::PseudoVIOTA_M_MF4:
3508-
case RISCV::PseudoVIOTA_M_MF2:
3509-
case RISCV::PseudoVIOTA_M_M1:
3510-
case RISCV::PseudoVIOTA_M_M2:
3511-
case RISCV::PseudoVIOTA_M_M4:
3512-
case RISCV::PseudoVIOTA_M_M8:
3505+
if (RISCV::getRVVMCOpcode(True->getMachineOpcode()) == RISCV::VIOTA_M)
35133506
if (Mask && !usesAllOnesMask(Mask, Glue))
35143507
return false;
3515-
}
35163508

35173509
unsigned TrueOpc = True.getMachineOpcode();
35183510
const MCInstrDesc &TrueMCID = TII->get(TrueOpc);

0 commit comments

Comments
 (0)