Skip to content

Commit 9111bcf

Browse files
committed
fixup! Address reviewer's comments
1 parent 9ae6a4d commit 9111bcf

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfo.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1718,8 +1718,11 @@ bool RISCVInstrInfo::areRVVInstsReassociable(const MachineInstr &MI1,
17181718
}
17191719

17201720
if (It->definesRegister(RISCV::V0, TRI)) {
1721-
Register SrcReg =
1722-
TRI->lookThruCopyLike(It->getOperand(1).getReg(), MRI);
1721+
Register SrcReg = It->getOperand(1).getReg();
1722+
// If it's not VReg it'll be more difficult to track its defs, so
1723+
// bailing out here just to be safe.
1724+
if (!SrcReg.isVirtual())
1725+
return false;
17231726

17241727
if (!MI1VReg.isValid()) {
17251728
// This is the V0 def for MI1.

0 commit comments

Comments
 (0)