[PATCH] D91725: [LoopIdiom] 'left-shift until bittest' idiom: support constant bit mask

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 18 10:28:35 PST 2020


lebedev.ri created this revision.
lebedev.ri added reviewers: craig.topper, fhahn, jdoerfert.
lebedev.ri added a project: LLVM.
Herald added a subscriber: hiraditya.
lebedev.ri requested review of this revision.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D91725

Files:
  llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
  llvm/test/Transforms/LoopIdiom/X86/left-shift-until-bittest.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91725.306148.patch
Type: text/x-patch
Size: 16528 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201118/a9f61475/attachment.bin>


More information about the llvm-commits mailing list