Skip to content

Commit bedde94

Browse files
committed
hasSameAVL also consider AVLReg
1 parent 4ed7160 commit bedde94

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp

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

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

573574
if (hasAVLImm() && Other.hasAVLImm())
574575
return getAVLImm() == Other.getAVLImm();

0 commit comments

Comments
 (0)