Skip to content

Commit 8f566c4

Browse files
committed
Its -> it's, use operands_begin() to get operand iterator
1 parent f2f28f5 commit 8f566c4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

llvm/lib/Target/RISCV/RISCVVectorPeephole.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -769,21 +769,23 @@ bool RISCVVectorPeephole::foldVMergeToMask(MachineInstr &MI) const {
769769
"Foldable unmasked pseudo should have a policy op already");
770770

771771
// Make sure the mask dominates True, otherwise move down True so it does.
772-
// VL will always dominate because if its a register they need to be the same.
772+
// VL will always dominate since if it's a register they need to be the same.
773773
if (!ensureDominates(MaskOp, True))
774774
return false;
775775

776776
True.setDesc(TII->get(Info->MaskedPseudo));
777777

778778
// Insert the mask operand.
779779
// TODO: Increment MaskOpIdx by number of explicit defs?
780-
True.insert(&True.getOperand(Info->MaskOpIdx + True.getNumExplicitDefs()),
780+
True.insert(True.operands_begin() + Info->MaskOpIdx +
781+
True.getNumExplicitDefs(),
781782
MachineOperand::CreateReg(MaskOp.getReg(), false));
782783

783784
// Update the passthru, AVL and policy.
784785
True.getOperand(True.getNumExplicitDefs()).setReg(FalseReg);
785786
True.removeOperand(RISCVII::getVLOpNum(True.getDesc()));
786-
True.insert(&True.getOperand(RISCVII::getVLOpNum(True.getDesc())), MinVL);
787+
True.insert(True.operands_begin() + RISCVII::getVLOpNum(True.getDesc()),
788+
MinVL);
787789
True.getOperand(RISCVII::getVecPolicyOpNum(True.getDesc())).setImm(Policy);
788790

789791
MRI->replaceRegWith(True.getOperand(0).getReg(), MI.getOperand(0).getReg());

0 commit comments

Comments
 (0)