Currently we expect A to be on the same side in both Ands but nothing guarantees that.
While there also switch to using matchers for some of the code.
Paths
| Differential D34230
[InstCombine] Handle (iszero(A & K1) | iszero(A & K2)) -> (A & (K1 | K2)) != (K1 | K2) when the one of the Ands is commuted relative to the other ClosedPublic Authored by craig.topper on Jun 14 2017, 6:13 PM.
Details Summary Currently we expect A to be on the same side in both Ands but nothing guarantees that. While there also switch to using matchers for some of the code.
Diff Detail
Event TimelineComment Actions LGTM. See inline for a possible follow-up and nit.
This revision is now accepted and ready to land.Jun 15 2017, 10:31 AM
Closed by commit rL305487: [InstCombine] Handle (iszero(A & K1) | iszero(A & K2)) -> (A & (K1 | K2)) !=… (authored by ctopper). · Explain WhyJun 15 2017, 10:56 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 102691 llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
llvm/trunk/test/Transforms/InstCombine/onehot_merge.ll
|