diff options
author | Sanjay Patel <spatel@rotateright.com> | 2019-05-13 17:28:19 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2019-05-13 17:28:19 +0000 |
commit | 760f61ab36f95772bb8d76cd0af42c4bd78bd740 (patch) | |
tree | 7dc53625a5624a15551c24e8f5039e0fc0d7ff7a /lldb/source/Commands/CommandObjectProcess.cpp | |
parent | c33f754e747b8afe036c3b5434133389aba880d8 (diff) | |
download | bcm5719-llvm-760f61ab36f95772bb8d76cd0af42c4bd78bd740.tar.gz bcm5719-llvm-760f61ab36f95772bb8d76cd0af42c4bd78bd740.zip |
[InstCombine] try harder to form rotate (funnel shift) (PR20750)
We have a similar match for patterns ending in a truncate. This
should be ok for all targets because the default expansion would
still likely be better from replacing 2 'and' ops with 1.
Attempt to show the logic equivalence in Alive (which doesn't
currently have funnel-shift in its vocabulary AFAICT):
%shamt = zext i8 %i to i32
%m = and i32 %shamt, 31
%neg = sub i32 0, %shamt
%and4 = and i32 %neg, 31
%shl = shl i32 %v, %m
%shr = lshr i32 %v, %and4
%or = or i32 %shr, %shl
=>
%a = and i8 %i, 31
%shamt2 = zext i8 %a to i32
%neg2 = sub i32 0, %shamt2
%and4 = and i32 %neg2, 31
%shl = shl i32 %v, %shamt2
%shr = lshr i32 %v, %and4
%or = or i32 %shr, %shl
https://rise4fun.com/Alive/V9r
llvm-svn: 360605
Diffstat (limited to 'lldb/source/Commands/CommandObjectProcess.cpp')
0 files changed, 0 insertions, 0 deletions