[all-commits] [llvm/llvm-project] 0dcd2b: [TTI] Remove default condition type and predicate ...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Wed Oct 6 07:40:56 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0dcd2b40e6879542d708fdb9dcfdcbcaffdc2ce7
      https://github.com/llvm/llvm-project/commit/0dcd2b40e6879542d708fdb9dcfdcbcaffdc2ce7
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-10-06 (Wed, 06 Oct 2021)

  Changed paths:
    M llvm/include/llvm/Analysis/TargetTransformInfo.h
    M llvm/include/llvm/Transforms/Utils/LoopUtils.h
    M llvm/lib/Transforms/Utils/LoopUtils.cpp
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    M llvm/lib/Transforms/Vectorize/VectorCombine.cpp
    M llvm/test/Transforms/VectorCombine/X86/extract-cmp-binop.ll
    M llvm/test/Transforms/VectorCombine/X86/extract-cmp.ll
    M llvm/test/Transforms/VectorCombine/X86/scalarize-cmp-inseltpoison.ll
    M llvm/test/Transforms/VectorCombine/X86/scalarize-cmp.ll

  Log Message:
  -----------
  [TTI] Remove default condition type and predicate arguments from getCmpSelInstrCost

We need to be better at exposing the comparison predicate to getCmpSelInstrCost calls as some targets (e.g. X86 SSE) have very different costs for different comparisons (PR48337), and we can't always rely on the optional Instruction argument.

This initial commit requires explicit condition type and predicate arguments. The next step will be to review a lot of the existing getCmpSelInstrCost calls which have used BAD_ICMP_PREDICATE even when the predicate is known.

Differential Revision: https://reviews.llvm.org/D111024




More information about the All-commits mailing list