diff options
author | Michael Kuperstein <michael.m.kuperstein@intel.com> | 2015-12-16 11:22:37 +0000 |
---|---|---|
committer | Michael Kuperstein <michael.m.kuperstein@intel.com> | 2015-12-16 11:22:37 +0000 |
commit | e75e6e2a2393f9236fc5d492233dc1d8633c2691 (patch) | |
tree | b7a628e2af53ad3f2047ece67ed66381435ebec9 /lldb/packages/Python/lldbsuite/test/dosep.py | |
parent | 94f181a45fe03699ceb61aee11bf89d0ffd6a6c9 (diff) | |
download | bcm5719-llvm-e75e6e2a2393f9236fc5d492233dc1d8633c2691.tar.gz bcm5719-llvm-e75e6e2a2393f9236fc5d492233dc1d8633c2691.zip |
[X86] Improve shift combining
This folds (ashr (shl a, [56,48,32,24,16]), SarConst)
into (shl, (sext (a), [56,48,32,24,16] - SarConst))
or into (lshr, (sext (a), SarConst - [56,48,32,24,16]))
depending on sign of (SarConst - [56,48,32,24,16])
sexts in X86 are MOVs.
The MOVs have the same code size as above SHIFTs (only SHIFT by 1 has lower code size).
However the MOVs have 2 advantages to SHIFTs on x86:
1. MOVs can write to a register that differs from source.
2. MOVs accept memory operands.
This fixes PR24373.
Patch by: evgeny.v.stupachenko@intel.com
Differential Revision: http://reviews.llvm.org/D13161
llvm-svn: 255761
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/dosep.py')
0 files changed, 0 insertions, 0 deletions