HomePhabricator

[InstCombine] Fold ((C1-zext(X)) & C2) -> zext((C1-X) & C2)

Description

[InstCombine] Fold ((C1-zext(X)) & C2) -> zext((C1-X) & C2)

This is valid if C2 fits within the bitwidth of X thanks to two's
complement modulo arithmetic.

Details

Committed
majnemerJan 16 2017, 4:45 PM
Parents
rL292178: Add comment to test file I forgot to save
Branches
Unknown
Tags
Unknown