summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2016-11-01 19:19:29 +0000
committerSanjay Patel <spatel@rotateright.com>2016-11-01 19:19:29 +0000
commitc0339c77ef9372b85dc6b3fca8ce534fdac7341b (patch)
tree3f7ff52d796309ce682fca45e8e08345c280e942 /lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
parent654dc11b794c3196a446c479a9d4442cd0530d7a (diff)
[InstCombine] Fold nuw left-shifts in `ugt`/`ule` comparisons.
This transforms %a = shl nuw %x, c1 %b = icmp {ugt|ule} %a, c0 into %b = icmp {ugt|ule} %x, (c0 >> c1) z3: (declare-const x (_ BitVec 64)) (declare-const c0 (_ BitVec 64)) (declare-const c1 (_ BitVec 64)) (push) (assert (= x (bvlshr (bvshl x c1) c1))) ; nuw (assert (not (= (bvugt (bvshl x c1) c0) (bvugt x (bvlshr c0 c1))))) (check-sat) (get-model) (pop) (push) (assert (= x (bvlshr (bvshl x c1) c1))) ; nuw (assert (not (= (bvule (bvshl x c1) c0) (bvule x (bvlshr c0 c1))))) (check-sat) (get-model) (pop) Patch by bryant! Differential Revision: https://reviews.llvm.org/D25913 llvm-svn: 285729
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp')
0 files changed, 0 insertions, 0 deletions