Use successor location for dominator check.
The assignment is complete only after the statement. This marks self-assignments `x = x + 1` as non-sSA.
This commit is contained in:
parent
d29dc057ba
commit
263da251af
1 changed files with 1 additions and 1 deletions
|
@ -162,7 +162,7 @@ impl<'tcx> Visitor<'tcx> for SsaVisitor {
|
|||
Set1::Empty | Set1::Many => false,
|
||||
Set1::One(LocationExtended::Arg) => true,
|
||||
Set1::One(LocationExtended::Plain(assign)) => {
|
||||
assign.dominates(loc, &self.dominators)
|
||||
assign.successor_within_block().dominates(loc, &self.dominators)
|
||||
}
|
||||
};
|
||||
// We are visiting a use that is not dominated by an assignment.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue