HomePhabricator

Inlining: Don't re-map simplified cloned instructions.

Description

Inlining: Don't re-map simplified cloned instructions.

When simplifying an instruction that has been re-mapped, it should never
simplify to an instruction in the original function. In the edge case
where we are inlining a function into itself, the existing code led to
incorrect behavior. Replace the incorrect code with an assert verifying
that we never expect simplification to produce an instruction in the old
function, unless the functions are the same.

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

Details

Committed
iterateeJun 27 2017, 6:41 PM
Differential Revision
D33850: Inlining: Don't re-map simplified cloned instructions.
Parents
rL306494: [CodeGen] Fix assertion failure in EmitCallArg.
Branches
Unknown
Tags
Unknown