Baseline tests for canonicalizing "logic op, add"
((x + C1) & C2) --> ((x & C2) + C1) ((x + C1) ^ C2) --> ((x ^ C2) + C1) ((x + C1) | C2) --> ((x | C2) + C1)
for suitable constants C1 and C2.
Differential D131140
[NFC][InstCombine] Add baseline tests for canonicalizing "and, add", "or, add", "xor, add" emgullufsen on Aug 3 2022, 9:56 PM. Authored by
Details Baseline tests for canonicalizing "logic op, add" ((x + C1) & C2) --> ((x & C2) + C1) ((x + C1) ^ C2) --> ((x ^ C2) + C1) ((x + C1) | C2) --> ((x | C2) + C1) for suitable constants C1 and C2.
Diff Detail
Unit Tests Event TimelineComment Actions I need a few more test cases I'd neglected (multiple use negative case at least) I am realizing, will update patch. Comment Actions Looks fine but please just check the comments.
|
112 is not 0xFF800000