diff options
author | Shuxin Yang <shuxin.llvm@gmail.com> | 2012-12-04 22:15:32 +0000 |
---|---|---|
committer | Shuxin Yang <shuxin.llvm@gmail.com> | 2012-12-04 22:15:32 +0000 |
commit | 73285933c94a41e4e4e58364ba78763127fa4c27 (patch) | |
tree | 75a1c93140da4150dc0592efba81b3f1c7330bca /lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h | |
parent | 011aea45a9e4b39e89d6ab8068c464bbd6580622 (diff) | |
download | bcm5719-llvm-73285933c94a41e4e4e58364ba78763127fa4c27.tar.gz bcm5719-llvm-73285933c94a41e4e4e58364ba78763127fa4c27.zip |
For rdar://12329730, last piece.
This change attempts to simplify (X^Y) -> X or Y in the user's context if we know that
only bits from X or Y are demanded.
A minimized case is provided bellow. This change will simplify "t>>16" into "var1 >>16".
=============================================================
unsigned foo (unsigned val1, unsigned val2) {
unsigned t = val1 ^ 1234;
return (t >> 16) | t; // NOTE: t is used more than once.
}
=============================================================
Note that if the "t" were used only once, the expression would be finally optimized as well.
However, with with this change, the optimization will take place earlier.
Reviewed by Nadav, Thanks a lot!
llvm-svn: 169317
Diffstat (limited to 'lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h')
0 files changed, 0 insertions, 0 deletions