diff options
author | Roman Lebedev <lebedev.ri@gmail.com> | 2018-04-15 18:59:33 +0000 |
---|---|---|
committer | Roman Lebedev <lebedev.ri@gmail.com> | 2018-04-15 18:59:33 +0000 |
commit | 620b3da38f52a2a89b1a73b4d8ed8378f580a180 (patch) | |
tree | adfad95432dcf20e7b99d3348f878de8a86375fb /llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp | |
parent | 25cbb62d18e3521b5a696fcf8c9f78c8f0cfc7da (diff) | |
download | bcm5719-llvm-620b3da38f52a2a89b1a73b4d8ed8378f580a180.tar.gz bcm5719-llvm-620b3da38f52a2a89b1a73b4d8ed8378f580a180.zip |
[InstCombine] Simplify 'add' to 'or' if no common bits are set.
Summary:
In order to get the whole fold as specified in [[ https://bugs.llvm.org/show_bug.cgi?id=6773 | PR6773 ]],
let's first handle the simple straight-forward things.
Let's start with the `and` -> `or` simplification.
The one obvious thing missing here: the constant mask is not handled.
I have an idea how to handle it, but it will require some thinking,
and is not strictly required here, so i've left that for later.
https://rise4fun.com/Alive/Pkmg
Reviewers: spatel, craig.topper, eli.friedman, jingyue
Reviewed By: spatel
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D45631
llvm-svn: 330101
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp')
0 files changed, 0 insertions, 0 deletions