diff options
author | Sanjay Patel <spatel@rotateright.com> | 2020-06-08 14:09:04 -0400 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2020-06-08 14:41:50 -0400 |
commit | d50366d29f25fb2297b7561092132ecf74a391e9 (patch) | |
tree | 49dd891860113072d60d98cb2a200aaa98fe26b3 /llvm/lib/CodeGen/ModuloSchedule.cpp | |
parent | 9b41821c1b25986c5997377777f1843feb5294a2 (diff) | |
download | llvm-d50366d29f25fb2297b7561092132ecf74a391e9.zip llvm-d50366d29f25fb2297b7561092132ecf74a391e9.tar.gz llvm-d50366d29f25fb2297b7561092132ecf74a391e9.tar.bz2 |
[InstCombine] improve matching for sext-lshr-trunc patterns, part 2
Similar to rG42f488b63a04
This is intended to preserve the logic of the existing transform,
but remove unnecessary restrictions on uses and types.
https://rise4fun.com/Alive/oS0
Name: narrow input
Pre: C1 <= width(C1) - 24
%B = sext i8 %A
%C = lshr %B, C1
%r = trunc %C to i24
=>
%s = ashr i8 %A, trunc(umin(C1, 7))
%r = sext i8 %s to i24
Name: wide input
Pre: C1 <= width(C1) - 24
%B = sext i24 %A
%C = lshr %B, C1
%r = trunc %C to i8
=>
%s = ashr i24 %A, trunc(umin(C1, 23))
%r = trunc i24 %s to i8
Diffstat (limited to 'llvm/lib/CodeGen/ModuloSchedule.cpp')
0 files changed, 0 insertions, 0 deletions