Skip to content

Commit e2b8af7

Browse files
authored
[RISCV] Don't use MachineInstr::isIdenticalTo in hasSameAVL (#90431)
MachineInstr::isIdenticalTo compares that the operands and flags are the same IIUC, but I think we actually want to check that it's the same MachineInstr * with respect to position in the block etc.
1 parent 66274eb commit e2b8af7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,8 +568,8 @@ class VSETVLIInfo {
568568

569569
bool hasSameAVL(const VSETVLIInfo &Other) const {
570570
if (hasAVLReg() && Other.hasAVLReg())
571-
return getAVLDefMI().isIdenticalTo(Other.getAVLDefMI()) &&
572-
getAVLReg() == Other.getAVLReg();
571+
return AVLRegDef.DefMI == Other.AVLRegDef.DefMI &&
572+
AVLRegDef.DefReg == Other.AVLRegDef.DefReg;
573573

574574
if (hasAVLImm() && Other.hasAVLImm())
575575
return getAVLImm() == Other.getAVLImm();

0 commit comments

Comments
 (0)