HomePhabricator

[MachineSink] Fix for breaking phi edges with instructions with multiple defs
bab8d1790a33Unpublished

Authored by dmgreen on Apr 16 2020, 7:23 AM.

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

[MachineSink] Fix for breaking phi edges with instructions with multiple defs

BreakPHIEdge would be set based on whether the instruction needs to
insert a new critical edge to allow sinking into a block where the uses
are PHI nodes. But for instructions with multiple defs it would be reset
on the second def, allowing the instruciton to sink where it should not.

Fixes PR44981

Differential Revision: https://reviews.llvm.org/D78087

(cherry picked from commit 44c4ba34d001dcf538d7396007b5611d6f697f86)