aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2021-11-16 09:18:18 -0500
committerSanjay Patel <spatel@rotateright.com>2021-11-16 09:27:30 -0500
commit8fce94f91610bc4614b1fe0bff8f143ea2b54742 (patch)
tree0924e93db11b0f806ddcfb4e6aa8f19aa8dee2e4 /lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h
parent900cc1a226c8b8512fd3d4af90f9d7e5ecc1e722 (diff)
downloadllvm-8fce94f91610bc4614b1fe0bff8f143ea2b54742.zip
llvm-8fce94f91610bc4614b1fe0bff8f143ea2b54742.tar.gz
llvm-8fce94f91610bc4614b1fe0bff8f143ea2b54742.tar.bz2
[InstCombine] canonicalize icmp with trunc op into mask and cmp, part 2
If C is a high-bit mask: (trunc X) u< C --> (X & C) != C (are any masked-high-bits clear?) If C is low-bit mask: (trunc X) u> C --> (X & ~C) != 0 (are any masked-high-bits set?) If C is not-of-power-of-2 (one clear bit): (trunc X) u> C --> (X & (C+1)) == C+1 (are all masked-high-bits set?) This extends the fold added with: acabad9ff6bf (https://alive2.llvm.org/ce/z/aFr7qV) Using decomposeBitTestICmp() to generalize this is a planned follow-up, but that requires removing an inverse fold. Here are Alive2 generalizations for these folds: https://alive2.llvm.org/ce/z/u-ZpC_ (ult, the previous patch) https://alive2.llvm.org/ce/z/YsuAu2 (ult, this patch) https://alive2.llvm.org/ce/z/ekktQP (ugt, low bitmask) https://alive2.llvm.org/ce/z/pJY9wR (ugt, one clear bit) Differential Revision: https://reviews.llvm.org/D112634
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h')
0 files changed, 0 insertions, 0 deletions