[PATCH] D54869: [InstCombine] Determine demanded and known bits for funnel shifts
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 24 07:18:57 PST 2018
nikic created this revision.
nikic added reviewers: spatel, RKSimon.
Herald added a subscriber: llvm-commits.
Support funnel shifts in InstCombine demanded bits simplification. If the shift amount is constant, we can determine both the demanded bits of the operands, as well as the known bits of the result.
If one of the operands has no demanded bits, it will be replaced by undef and the funnel shift will be simplified into a simple shift due to the simplifications added in D54778 <https://reviews.llvm.org/D54778>.
---
This change has been split off from D54666 <https://reviews.llvm.org/D54666>.
Another place where support for computing fsh demanded bits can be added is the DemandedBits analysis driving BDCE. This will allow handling funnel shifts with multiple uses. Unfortunately DemandedBits only tracks bits on a per-instruction level, so that the different demanded bits of the two operands cannot be leveraged.
Repository:
rL LLVM
https://reviews.llvm.org/D54869
Files:
lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
test/Transforms/InstCombine/fsh.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54869.175159.patch
Type: text/x-patch
Size: 4383 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181124/e1a27155/attachment.bin>
More information about the llvm-commits
mailing list