diff options
author | Sanjay Patel <spatel@rotateright.com> | 2018-06-20 14:22:49 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2018-06-20 14:22:49 +0000 |
commit | 0c57de4c214a2b61811e247365a830cb70683a82 (patch) | |
tree | 78e887f001c57d353bb058f572c1102ae130f2e1 /lldb/packages/Python/lldbsuite/test/functionalities/command_regex | |
parent | c1d2177f9dcbe1a1b7a9b8e441d6cbddc014db52 (diff) | |
download | bcm5719-llvm-0c57de4c214a2b61811e247365a830cb70683a82.tar.gz bcm5719-llvm-0c57de4c214a2b61811e247365a830cb70683a82.zip |
[InstSimplify] Fix missed optimization in simplifyUnsignedRangeCheck()
For both operands are unsigned, the following optimizations are valid, and missing:
1. X > Y && X != 0 --> X > Y
2. X > Y || X != 0 --> X != 0
3. X <= Y || X != 0 --> true
4. X <= Y || X == 0 --> X <= Y
5. X > Y && X == 0 --> false
unsigned foo(unsigned x, unsigned y) { return x > y && x != 0; }
should fold to x > y, but I found we haven't done it right now.
besides, unsigned foo(unsigned x, unsigned y) { return x < y && y != 0; }
Has been folded to x < y, so there may be a bug.
Patch by: Li Jia He!
Differential Revision: https://reviews.llvm.org/D47922
llvm-svn: 335129
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities/command_regex')
0 files changed, 0 insertions, 0 deletions