Commit Graph

2 Commits

Author SHA1 Message Date
Simon Pilgrim a6e9141505 [TTI] Add OperandValueProperties::OP_NegatedPowerOf2 enum (PR51436)
The mul by constant costmodels handle power-of-2 constants, but not negated-power-of-2, despite the backends handling both.

This patch adds the OperandValueProperties::OP_NegatedPowerOf2 enum and wires it for use for basic mul cost analysis and SLP handling.

Fixes #50778

Differential Revision: https://reviews.llvm.org/D111968
2022-09-23 14:03:18 +01:00
Simon Pilgrim e56b507447 [CostModel][X86] Add CostKinds test coverage for mul-by-constant patterns
Help check to see the costs predicted for mul->shift conversions
2022-09-22 16:40:57 +01:00