This is an archive of the discontinued LLVM Phabricator instance.

[ppc] Add support to for popcntb instruction to llvm.
Needs ReviewPublic

Authored by spanzer on Sep 1 2017, 3:56 PM.

Details

Reviewers
echristo
Summary

popcntb computes per-byte population counts for a 64-bit integer. It's been supported in hardware since P5.

Diff Detail

Repository
rL LLVM

Event Timeline

spanzer created this revision.Sep 1 2017, 3:56 PM
echristo added inline comments.Sep 7 2017, 4:16 PM
include/llvm/IR/IntrinsicsPowerPC.td
60–62

Rather than this I think you want to conditionalize on CTPOP as an ISD and fix the lowering that way?

FYI
I also have a patch to add popcntb here: https://reviews.llvm.org/D37342
I'm going to be committing it today.