diff options
author | Philip Reames <listmail@philipreames.com> | 2015-11-10 18:46:14 +0000 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2015-11-10 18:46:14 +0000 |
commit | 2d858747df4c999ee08d1102d75befb797e9d09e (patch) | |
tree | 68b3f42bb73f8fad1f87fa7237608ad0d68565c6 /llvm/lib/CodeGen | |
parent | cad135a95c38c5f676a0e21de49573db22c051a7 (diff) | |
download | bcm5719-llvm-2d858747df4c999ee08d1102d75befb797e9d09e.tar.gz bcm5719-llvm-2d858747df4c999ee08d1102d75befb797e9d09e.zip |
[ValueTracking] Recognize that and(x, add (x, -1)) clears the low bit
This is a cleaned up version of a patch by John Regehr with permission. Originally found via the souper tool.
If we add an odd number to x, then bitwise-and the result with x, we know that the low bit of the result must be zero. Either it was zero in x originally, or the add cleared it in the temporary value. As a result, one of the two values anded together must have the bit cleared.
Differential Revision: http://reviews.llvm.org/D14315
llvm-svn: 252629
Diffstat (limited to 'llvm/lib/CodeGen')
0 files changed, 0 insertions, 0 deletions