[PATCH] D15718: Recognize patterns for ctpop and ctlz in instcombine

Krzysztof Parzyszek via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 22 09:19:16 PST 2015


kparzysz created this revision.
kparzysz added a reviewer: majnemer.
kparzysz added a subscriber: llvm-commits.
kparzysz set the repository for this revision to rL LLVM.

Recognize the patterns for population count and for count-leading-zeros in the instruction combiner and replace them with calls to the corresponding intrinsics.
The patterns are based on those in "Hacker's Delight".

Repository:
  rL LLVM

http://reviews.llvm.org/D15718

Files:
  lib/Transforms/InstCombine/InstCombineAddSub.cpp
  test/Transforms/InstCombine/ctlz-match.ll
  test/Transforms/InstCombine/ctpop-match.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15718.43452.patch
Type: text/x-patch
Size: 25714 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151222/e47dbf10/attachment.bin>


More information about the llvm-commits mailing list