HomePhabricator

[GlobalISel] Add combine for (x | mask) -> x when (x | mask) == x

Authored by mbrkusanin on Nov 6 2020, 6:36 AM.

Description

[GlobalISel] Add combine for (x | mask) -> x when (x | mask) == x

If we have a mask, and a value x, where (x | mask) == x, we can drop the OR
and just use x.

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