diff options
author | Sanjay Patel <spatel@rotateright.com> | 2019-10-10 17:52:02 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2019-10-10 17:52:02 +0000 |
commit | 7b904ce7246b7cde2d716eefafd4ef2ce2b3234a (patch) | |
tree | 20fd33656a1cb4a032f6886f498bf6e7923403bb /lldb/packages/Python/lldbsuite/test/python_api/process/main.cpp | |
parent | 6a2eff1e68a269647b7f8e23842120738b139c11 (diff) | |
download | bcm5719-llvm-7b904ce7246b7cde2d716eefafd4ef2ce2b3234a.tar.gz bcm5719-llvm-7b904ce7246b7cde2d716eefafd4ef2ce2b3234a.zip |
[DAGCombiner] fold select-of-constants to shift
This reverses the scalar canonicalization proposed in D63382.
Pre: isPowerOf2(C1)
%r = select i1 %cond, i32 C1, i32 0
=>
%z = zext i1 %cond to i32
%r = shl i32 %z, log2(C1)
https://rise4fun.com/Alive/Z50
x86 already tries to fold this pattern, but it isn't done
uniformly, so we still see a diff. AArch64 probably should
enable the TLI hook to benefit too, but that's a follow-on.
llvm-svn: 374397
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/process/main.cpp')
0 files changed, 0 insertions, 0 deletions