summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2018-11-13 22:47:24 +0000
committerSanjay Patel <spatel@rotateright.com>2018-11-13 22:47:24 +0000
commitf8f12272e80fd37f6ee48b7ffef9d7296dcd2e33 (patch)
tree259dcf63ddac790b771d072158e2470d6744dd8c /lldb/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py
parente19dc6137fadf44aac0385357e3169350a2061c0 (diff)
downloadbcm5719-llvm-f8f12272e80fd37f6ee48b7ffef9d7296dcd2e33.tar.gz
bcm5719-llvm-f8f12272e80fd37f6ee48b7ffef9d7296dcd2e33.zip
[InstCombine] canonicalize rotate patterns with cmp/select
The cmp+branch variant of this pattern is shown in: https://bugs.llvm.org/show_bug.cgi?id=34924 ...and as discussed there, we probably can't transform that without a rotate intrinsic. We do have that now via funnel shift, but we're not quite ready to canonicalize IR to that form yet. The case with 'select' should already be transformed though, so that's this patch. The sequence with negation followed by masking is what we use in the backend and partly in clang (though that part should be updated). https://rise4fun.com/Alive/TplC %cmp = icmp eq i32 %shamt, 0 %sub = sub i32 32, %shamt %shr = lshr i32 %x, %shamt %shl = shl i32 %x, %sub %or = or i32 %shr, %shl %r = select i1 %cmp, i32 %x, i32 %or => %neg = sub i32 0, %shamt %masked = and i32 %shamt, 31 %maskedneg = and i32 %neg, 31 %shl2 = lshr i32 %x, %masked %shr2 = shl i32 %x, %maskedneg %r = or i32 %shl2, %shr2 llvm-svn: 346807
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud