Use alignDown instead of &= ~7.
Replace ResultBit with NLZ. (BitWidth - NLZ - NTZ == 8) so
(BitWidth - NTZ - 8 == NLZ).
Paths
| Differential D117804
[TargetLowering][InstCombine] Simplify BSwap demanded bits code a little. NFC ClosedPublic Authored by craig.topper on Jan 20 2022, 9:48 AM.
Details Summary Use alignDown instead of &= ~7. Replace ResultBit with NLZ. (BitWidth - NLZ - NTZ == 8) so
Diff Detail
Event TimelineComment Actions LGTM
This revision is now accepted and ready to land.Jan 20 2022, 10:34 AM This revision was landed with ongoing or failed builds.Jan 20 2022, 10:45 AM Closed by commit rG9abc593e9889: [TargetLowering][InstCombine] Simplify BSwap demanded bits code a little. NFC (authored by craig.topper). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 401696 llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
|
Spacing/indentation look wrong (clang-format).