Skip to content

Commit

Permalink
[LLVM][XTHeadVector] correctly expand pseudos for vmset/vmclr
Browse files Browse the repository at this point in the history
  • Loading branch information
imkiva committed Jun 21, 2024
1 parent 276a28f commit 1a276de
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,18 +146,24 @@ bool RISCVExpandPseudo::expandMI(MachineBasicBlock &MBB,
case RISCV::PseudoVMSET_M_B64:
// vmset.m vd => vmxnor.mm vd, vd, vd
return expandVMSET_VMCLR(MBB, MBBI, RISCV::VMXNOR_MM);
case RISCV::PseudoTH_VMCLR_M_B1:
case RISCV::PseudoTH_VMCLR_M_B2:
case RISCV::PseudoTH_VMCLR_M_B4:
case RISCV::PseudoTH_VMCLR_M_B8:
case RISCV::PseudoTH_VMCLR_M_B16:
case RISCV::PseudoTH_VMCLR_M_B32:
case RISCV::PseudoTH_VMCLR_M_B64:
// th.vmclr.m vd => th.vmxor.mm vd, vd, vd
return expandVMSET_VMCLR(MBB, MBBI, RISCV::TH_VMXOR_MM);
// th.vmclr.m vd => th.vmxor.mm vd, vd, vd
return expandVMSET_VMCLR(MBB, MBBI, RISCV::TH_VMXOR_MM);
case RISCV::PseudoTH_VMSET_M_B1:
case RISCV::PseudoTH_VMSET_M_B2:
case RISCV::PseudoTH_VMSET_M_B4:
case RISCV::PseudoTH_VMSET_M_B8:
case RISCV::PseudoTH_VMSET_M_B16:
case RISCV::PseudoTH_VMSET_M_B32:
case RISCV::PseudoTH_VMSET_M_B64:
// th.vmset.m vd => th.vmxnor.mm vd, vd, vd
return expandVMSET_VMCLR(MBB, MBBI, RISCV::TH_VMXNOR_MM);
// th.vmset.m vd => th.vmxnor.mm vd, vd, vd
return expandVMSET_VMCLR(MBB, MBBI, RISCV::TH_VMXNOR_MM);
}

return false;
Expand Down

0 comments on commit 1a276de

Please sign in to comment.