[PATCH] D111024: [TTI] Remove default condition type and predicate arguments from getCmpSelInstrCost

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 3 07:44:49 PDT 2021


RKSimon created this revision.
RKSimon added reviewers: fhahn, ABataev, spatel, samparker.
Herald added subscribers: pengfei, hiraditya.
RKSimon requested review of this revision.
Herald added a project: LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D111024

Files:
  llvm/include/llvm/Analysis/TargetTransformInfo.h
  llvm/include/llvm/Transforms/Utils/LoopUtils.h
  llvm/lib/Transforms/Utils/LoopUtils.cpp
  llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
  llvm/lib/Transforms/Vectorize/VectorCombine.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111024.376766.patch
Type: text/x-patch
Size: 10056 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211003/71bccf1b/attachment.bin>


More information about the llvm-commits mailing list