This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine][NFC] Add tests for mask canonicalization in masked merge
AbandonedPublic

Authored by lebedev.ri on Apr 14 2018, 8:14 AM.

Details

Reviewers
None
Summary

While this is NFC, i don't know if we do want to do this, so for now it's not a commit.

Masked merge has a pattern of: ((x ^ y) & M) ^ y.
Once PR6773 fold is done, that pattern will be produced.

But, if the mask is constant, there is no difference between ((x ^ y) & M) ^ y and ((x ^ y) & ~M) ^ x and ((x ^ y) & ~(~M)) ^ y,
I think the constant mask should be canonicalized.

Diff Detail

Repository
rL LLVM

Event Timeline

Drop duplicate tests.

lebedev.ri abandoned this revision.Apr 19 2018, 3:55 AM