diff options
author | Roman Lebedev <lebedev.ri@gmail.com> | 2020-10-27 12:17:53 +0300 |
---|---|---|
committer | Roman Lebedev <lebedev.ri@gmail.com> | 2020-10-27 14:42:53 +0300 |
commit | 0ac56e8eaaeb41b59a952fa465872f647c930347 (patch) | |
tree | 2441e413cf9489d3bb76cd7362f9f02b2f8dc1bb /llvm/lib/BinaryFormat/MsgPackDocument.cpp | |
parent | 5e3a8953ace7f5783ef592f1786d7f10610648ad (diff) | |
download | llvm-0ac56e8eaaeb41b59a952fa465872f647c930347.zip llvm-0ac56e8eaaeb41b59a952fa465872f647c930347.tar.gz llvm-0ac56e8eaaeb41b59a952fa465872f647c930347.tar.bz2 |
[InstCombine] Fold `(X >>? C1) << C2` patterns to shift+bitmask (PR37872)
This is essentially finalizes a revert of rL155136,
because nowadays the situation has improved, SCEV can model
all these patterns well, and we canonicalize rotate-like patterns
into a funnel shift intrinsics in InstCombine.
So this should not cause any pessimization.
I've verified the canonicalize-{a,l}shr-shl-to-masking.ll transforms
with alive, which confirms that we can freely preserve exact-ness,
and no-wrap flags.
Profs:
* base: https://rise4fun.com/Alive/gPQ
* exact-ness preservation: https://rise4fun.com/Alive/izi
* nuw preservation: https://rise4fun.com/Alive/DmD
* nsw preservation: https://rise4fun.com/Alive/SLN6N
* nuw nsw preservation: https://rise4fun.com/Alive/Qp7
Refs. https://reviews.llvm.org/D46760
Diffstat (limited to 'llvm/lib/BinaryFormat/MsgPackDocument.cpp')
0 files changed, 0 insertions, 0 deletions