[InstCombine] Sink pure instructions down to return and unreachable blocks
If the only user of `Instr` is in a return or unreachable block, we can sink `Instr` to the`User` safely (unless it reads/writes memory). Return or unreachable blocks are guaranteed to execute zero or one time, and `Instr` always dominates `User`, so they either will be executed together (execution of `User` always implies execution of `Instr`) or not executed at all. Differential Revision: https://reviews.llvm.org/D80120 Reviewed By: asbirlea, jdoerfert
Loading
Please sign in to comment