summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/python_api/thread/TestThreadAPI.py
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2019-07-24 22:57:22 +0000
committerRoman Lebedev <lebedev.ri@gmail.com>2019-07-24 22:57:22 +0000
commit017e272c3add50cd214b6c8d9549397ae157a4c3 (patch)
tree7f6711164917e18077deb7f0d141268411ad52c1 /lldb/packages/Python/lldbsuite/test/python_api/thread/TestThreadAPI.py
parent68499112cf6b49aa7ee3a48f17dea7132b84255c (diff)
downloadbcm5719-llvm-017e272c3add50cd214b6c8d9549397ae157a4c3.tar.gz
bcm5719-llvm-017e272c3add50cd214b6c8d9549397ae157a4c3.zip
[Codegen] (X & (C l>>/<< Y)) ==/!= 0 --> ((X <</l>> Y) & C) ==/!= 0 fold
Summary: This was originally reported in D62818. https://rise4fun.com/Alive/oPH InstCombine does the opposite fold, in hope that `C l>>/<< Y` expression will be hoisted out of a loop if `Y` is invariant and `X` is not. But as it is seen from the diffs here, if it didn't get hoisted, the produced assembly is almost universally worse. Much like with my recent "hoist add/sub by/from const" patches, we should get almost universal win if we hoist constant, there is almost always an "and/test by imm" instruction, but "shift of imm" not so much, so we may avoid having to materialize the immediate, and thus need one less register. And since we now shift not by constant, but by something else, the live-range of that something else may reduce. Special care needs to be applied not to disturb x86 `BT` / hexagon `tstbit` instruction pattern. And to not get into endless combine loop. Reviewers: RKSimon, efriedma, t.p.northover, craig.topper, spatel, arsenm Reviewed By: spatel Subscribers: hiraditya, MaskRay, wuzish, xbolva00, nikic, nemanjai, jvesely, wdng, nhaehnle, javed.absar, tpr, kristof.beyls, jsji, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62871 llvm-svn: 366955
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/thread/TestThreadAPI.py')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud