File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,10 @@ static unsigned getSEWOpNum(const MachineInstr &MI) {
7070 return RISCVII::getSEWOpNum (MI.getDesc ());
7171}
7272
73+ static unsigned getVecPolicyOpNum (const MachineInstr &MI) {
74+ return RISCVII::getVecPolicyOpNum (MI.getDesc ());
75+ }
76+
7377// / Get the EEW for a load or store instruction. Return std::nullopt if MI is
7478// / not a load or store which ignores SEW.
7579static std::optional<unsigned > getEEWForLoadStore (const MachineInstr &MI) {
@@ -986,7 +990,7 @@ RISCVInsertVSETVLI::computeInfoForInstr(const MachineInstr &MI) const {
986990
987991 // If there is a policy operand, use it.
988992 if (RISCVII::hasVecPolicyOp (TSFlags)) {
989- const MachineOperand &Op = MI.getOperand (MI. getNumExplicitOperands () - 1 );
993+ const MachineOperand &Op = MI.getOperand (getVecPolicyOpNum (MI) );
990994 uint64_t Policy = Op.getImm ();
991995 assert (Policy <=
992996 (RISCVVType::TAIL_AGNOSTIC | RISCVVType::MASK_AGNOSTIC) &&
You can’t perform that action at this time.
0 commit comments