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) {
70
70
return RISCVII::getSEWOpNum (MI.getDesc ());
71
71
}
72
72
73
+ static unsigned getVecPolicyOpNum (const MachineInstr &MI) {
74
+ return RISCVII::getVecPolicyOpNum (MI.getDesc ());
75
+ }
76
+
73
77
// / Get the EEW for a load or store instruction. Return std::nullopt if MI is
74
78
// / not a load or store which ignores SEW.
75
79
static std::optional<unsigned > getEEWForLoadStore (const MachineInstr &MI) {
@@ -986,7 +990,7 @@ RISCVInsertVSETVLI::computeInfoForInstr(const MachineInstr &MI) const {
986
990
987
991
// If there is a policy operand, use it.
988
992
if (RISCVII::hasVecPolicyOp (TSFlags)) {
989
- const MachineOperand &Op = MI.getOperand (MI. getNumExplicitOperands () - 1 );
993
+ const MachineOperand &Op = MI.getOperand (getVecPolicyOpNum (MI) );
990
994
uint64_t Policy = Op.getImm ();
991
995
assert (Policy <=
992
996
(RISCVVType::TAIL_AGNOSTIC | RISCVVType::MASK_AGNOSTIC) &&
You can’t perform that action at this time.
0 commit comments