[all-commits] [llvm/llvm-project] a6e914: [TTI] Add OperandValueProperties::OP_NegatedPowerO...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Fri Sep 23 06:04:06 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a6e9141505c5b8925c4f69efc85fa4d9be8073f3
      https://github.com/llvm/llvm-project/commit/a6e9141505c5b8925c4f69efc85fa4d9be8073f3
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-09-23 (Fri, 23 Sep 2022)

  Changed paths:
    M llvm/include/llvm/Analysis/TargetTransformInfo.h
    M llvm/lib/Analysis/TargetTransformInfo.cpp
    M llvm/lib/Target/X86/X86TargetTransformInfo.cpp
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    M llvm/test/Analysis/CostModel/X86/mul-codesize.ll
    M llvm/test/Analysis/CostModel/X86/mul-latency.ll
    M llvm/test/Analysis/CostModel/X86/mul-sizelatency.ll
    M llvm/test/Analysis/CostModel/X86/mul.ll
    M llvm/test/Transforms/SLPVectorizer/X86/powof2mul.ll

  Log Message:
  -----------
  [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




More information about the All-commits mailing list