llvm / llvm/llvm-project

[X86] LowerCTPOP - move scalar integer "shifted mask" special cases to TargetLowering::expandCTPOP

Open
#223,404 1 comment 0 reactions 0 assignees View on GitHub
backend:X86
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

LowerCTPOP has i2/i3/i4/i8 special cases for values where a value only has 2/3/4/8 active bits in a sub mask.

Once #221671 has landed we should be able to move some/all of this to TargetLowering::expandCTPOP

Contributor guide

Open the contributing guide

Research direction

Start by reading LowerCTPOP and TargetLowering::expandCTPOP, then inspect the changes from #221671 to understand the available expansion path. Identify which i2/i3/i4/i8 scalar integer shifted-mask special cases can move, and verify that the resulting behavior remains covered by the existing compiler tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.