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 TimelineThis 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 102632 lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
test/Transforms/InstCombine/onehot_merge.ll
|
Could turn this into a matcher too; using m_Zero() would work with vectors.