diff options
author | Florian Hahn <flo@fhahn.com> | 2020-11-02 12:40:34 +0000 |
---|---|---|
committer | Florian Hahn <flo@fhahn.com> | 2020-11-02 15:39:29 +0000 |
commit | b3b993a7ad817c3c5801341fa78f34332900eb83 (patch) | |
tree | ff112679c386468cfe9ad1c11e09b2a917a462ba /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | c6eaa14e110b0298bc5714b228781ef69e05249b (diff) | |
download | llvm-b3b993a7ad817c3c5801341fa78f34332900eb83.zip llvm-b3b993a7ad817c3c5801341fa78f34332900eb83.tar.gz llvm-b3b993a7ad817c3c5801341fa78f34332900eb83.tar.bz2 |
Reland "[TTI] Add VecPred argument to getCmpSelInstrCost."
This reverts the revert commit 408c4408facc3a79ee4ff7e9983cc972f797e176.
This version of the patch includes a fix for a crash caused by
treating ICmp/FCmp constant expressions as instructions.
Original message:
On some targets, like AArch64, vector selects can be efficiently lowered
if the vector condition is a compare with a supported predicate.
This patch adds a new argument to getCmpSelInstrCost, to indicate the
predicate of the feeding select condition. Note that it is not
sufficient to use the context instruction when querying the cost of a
vector select starting from a scalar one, because the condition of the
vector select could be composed of compares with different predicates.
This change greatly improves modeling the costs of certain
compare/select patterns on AArch64.
I am also planning on putting up patches to make use of the new argument in
SLPVectorizer & LV.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions