File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
llvm/lib/Target/RISCV/GISel Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -530,8 +530,9 @@ bool RISCVInstructionSelector::select(MachineInstr &MI) {
530530 MachineFunction &MF = *MBB.getParent ();
531531 MachineIRBuilder MIB (MI);
532532
533- preISelLower (MI, MIB);
534533 const unsigned Opc = MI.getOpcode ();
534+ bool OpcWasGSplatVector = Opc == TargetOpcode::G_SPLAT_VECTOR;
535+ preISelLower (MI, MIB);
535536
536537 if (!MI.isPreISelOpcode () || Opc == TargetOpcode::G_PHI) {
537538 if (Opc == TargetOpcode::PHI || Opc == TargetOpcode::G_PHI) {
@@ -573,7 +574,7 @@ bool RISCVInstructionSelector::select(MachineInstr &MI) {
573574 // the MI is lowered, since renderVLOp needs to see the G_CONSTANT. It would
574575 // be nice if the InstructionSelector selected these instructions without
575576 // needing to call select on them explicitly.
576- if (Opc == RISCV::G_VMV_V_X_VL || Opc == RISCV::G_VFMV_V_F_VL ) {
577+ if (OpcWasGSplatVector ) {
577578 MachineInstr *Passthru = MRI->getVRegDef (MI.getOperand (1 ).getReg ());
578579 MachineInstr *VL = MRI->getVRegDef (MI.getOperand (3 ).getReg ());
579580 if (selectImpl (MI, *CoverageInfo))
You can’t perform that action at this time.
0 commit comments