This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] refactor optional bitcasting in matchSelectFromAndOr() into one code path (NFCI)
AbandonedPublic

Authored by spatel on Jun 23 2016, 2:59 PM.

Details

Reviewers
majnemer
Summary

This was suggested as a follow-up in D20774. It's less duplicated code, but I'm not sure if it's more readable.

Diff Detail

Event Timeline

spatel updated this revision to Diff 61728.Jun 23 2016, 2:59 PM
spatel retitled this revision from to [InstCombine] refactor optional bitcasting in matchSelectFromAndOr() into one code path (NFCI).
spatel updated this object.
spatel added a reviewer: majnemer.
spatel added a subscriber: llvm-commits.
spatel updated this revision to Diff 61736.Jun 23 2016, 3:58 PM

Patch updated:
Clean up the lambda def and variable names, so it's less messy.

spatel abandoned this revision.Jun 24 2016, 12:05 PM

On 2nd thought, this patch just exposed the strange split of logic of the original code.
I put all the commuted variants together in:
http://reviews.llvm.org/rL273702

And that makes the code in matchSelectFromAndOr() much easier to read:
http://reviews.llvm.org/rL273706