HomePhabricator

[InstCombine] Improve TryToSinkInstruction with multiple uses

Authored by anna on Sep 20 2021, 1:37 PM.

Description

[InstCombine] Improve TryToSinkInstruction with multiple uses

This patch allows sinking an instruction which can have multiple uses in a
single user. We were previously over-restrictive by looking for exactly one use,
rather than one user.

Also added an API for retrieving a unique undroppable user.

Reviewed By: nikic

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