The handing of the case where the mask is a constant is trivial,
if said constant is a power of two, the bit in question is log2(mask),
rest just works.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Paths
| Differential D91725
[LoopIdiom] 'left-shift until bittest' idiom: support constant bit mask ClosedPublic Authored by lebedev.ri on Nov 18 2020, 10:28 AM.
Details Summary The handing of the case where the mask is a constant is trivial,
Diff Detail
Event Timelinelebedev.ri added a child revision: D91726: [LoopIdiom] 'left-shift until bittest' idiom: support canonical sign bit mask. lebedev.ri added a parent revision: D91038: [LoopIdiom] Introduce 'left-shift until bittest' idiom.Dec 7 2020, 4:29 AM This revision is now accepted and ready to land.Dec 23 2020, 9:39 AM This revision was landed with ongoing or failed builds.Dec 23 2020, 11:28 AM Closed by commit rGcb2e5980bae3: [LoopIdiom] 'left-shift until bittest' idiom: support constant bit mask (authored by lebedev.ri). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 306166 llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
llvm/test/Transforms/LoopIdiom/X86/left-shift-until-bittest.ll
|