Skip to content

Commit 1d4265d

Browse files
committed
Fix OpIdx2 to passthru
1 parent 47d4804 commit 1d4265d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/RISCV/RISCVVectorPeephole.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ bool RISCVVectorPeephole::foldVMergeToMask(MachineInstr &MI) const {
758758
if (OtherIdx == -1)
759759
return false;
760760
unsigned OpIdx1 = OtherIdx;
761-
unsigned OpIdx2 = TargetInstrInfo::CommuteAnyOperandIndex;
761+
unsigned OpIdx2 = True.getNumExplicitDefs();
762762
if (!TII->findCommutedOpIndices(True, OpIdx1, OpIdx2))
763763
return false;
764764
NeedsCommute = {OpIdx1, OpIdx2};

0 commit comments

Comments
 (0)