The matching here wasn't able to handle all the possible commutes. It always assumed the not would be on the left of the xor, but that's not guaranteed.
Details
Details
Diff Detail
Diff Detail
Paths
| Differential D32474
[InstCombine] Add missing commute handling to (A | B) & (B ^ (~A)) -> (A & B) ClosedPublic Authored by craig.topper on Apr 24 2017, 11:43 PM.
Details Summary The matching here wasn't able to handle all the possible commutes. It always assumed the not would be on the left of the xor, but that's not guaranteed.
Diff Detail Event TimelineThis revision is now accepted and ready to land.Apr 25 2017, 7:02 AM Closed by commit rL301316: [InstCombine] Add missing commute handling to (A | B) & (B ^ (~A)) -> (A & B) (authored by ctopper). · Explain WhyApr 25 2017, 8:31 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 96507 lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
test/Transforms/InstCombine/and.ll
|