Skip to content

Commit c4bec64

Browse files
TejaX-Alagharic-rhodes
authored andcommitted
[TwoAddressInstruction] Track MadeChange when eliminating REG_SEQUENCE (#173535)
When `eliminateRegSequence()` is called, the pass modifies the `MachineFunction` but `MadeChange` was not being set to true. This causes the pass to incorrectly return `PreservedAnalyses::all()` even though changes were made.
1 parent fa656d9 commit c4bec64

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/lib/CodeGen/TwoAddressInstructionPass.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1865,8 +1865,10 @@ bool TwoAddressInstructionImpl::run() {
18651865

18661866
// Expand REG_SEQUENCE instructions. This will position mi at the first
18671867
// expanded instruction.
1868-
if (mi->isRegSequence())
1868+
if (mi->isRegSequence()) {
18691869
eliminateRegSequence(mi);
1870+
MadeChange = true;
1871+
}
18701872

18711873
DistanceMap.insert(std::make_pair(&*mi, ++Dist));
18721874

0 commit comments

Comments
 (0)