Page MenuHomePhabricator

[TargetLowering] Change SimplifyDemandedBits for XOR
Needs ReviewPublic

Authored by foad on Sep 10 2020, 9:21 AM.

Details

Summary

Don't simplify XOR to AND whenever we can, because it's not clear
(to me) that it's simpler.

Instead simplify:

(X | C) ^ C -> X & ~C
(X & ~C) ^ C -> X | C

These are clearly better because they remove one operation.

Diff Detail