llvm / llvm/llvm-project

[X86] Remove TuningSlowSHLD / isSHLDSlow and move LowerFunnelShift i32/i64 SHLD/SHRD expansion into MachineCombiner

Open
#184,016 8 comments 0 reactions 1 assignee Claimed by @stomfaig View on GitHub
backend:X86
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

isSHLDSlow targets always expand funnel shifts in SelectionDAG, sometimes unintentionally affecting register pressure.

Make i32/i64 FSHL/FSHR always legal and optionally expand to OR(SHL(),LSHR()) patterns using a X86InstrInfo::genAlternativeCodeSequence X86MachineCombinerPattern entry (if not building for MinSize/OptSize).

This will require the scheduler model numbers for SHLD/SHRD to be confirmed (some AMD targets in particular have been lazy and tagged many instructions as WriteMicrocoded).

This will probably require us to improve MachineCombiner register pressure handling as well.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.