diff options
author | Sanjay Patel <spatel@rotateright.com> | 2017-06-20 12:40:55 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2017-06-20 12:40:55 +0000 |
commit | adca825dc14fcdda6425bebcb2f342ea45231ac5 (patch) | |
tree | 575c2bb7d1b24d439d49b10b19704221dbbbf4fc /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | a6e2cebf98c5538c4796fedb7354c87cb0dd2c7d (diff) | |
download | bcm5719-llvm-adca825dc14fcdda6425bebcb2f342ea45231ac5.tar.gz bcm5719-llvm-adca825dc14fcdda6425bebcb2f342ea45231ac5.zip |
[InstCombine] try to canonicalize xor-of-icmps to and-of-icmps
We have a large portfolio of folds for and-of-icmps and or-of-icmps in InstSimplify and InstCombine,
but hardly anything for xor-of-icmps. Rather than trying to rethink and translate all of those folds,
we can use the truth table definition of xor:
X ^ Y --> (X | Y) & !(X & Y)
...to see if we can convert the xor to and/or and then use the existing folds.
http://rise4fun.com/Alive/J9v
Differential Revision: https://reviews.llvm.org/D33342
llvm-svn: 305792
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions