[all-commits] [llvm/llvm-project] 765348: [CostModel] Update default cost model for sadd/ssu...
Craig Topper via All-commits
all-commits at lists.llvm.org
Thu Sep 30 09:45:16 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 765348298c52bcff7c33d766cda954c3371a700f
https://github.com/llvm/llvm-project/commit/765348298c52bcff7c33d766cda954c3371a700f
Author: Craig Topper <craig.topper at sifive.com>
Date: 2021-09-30 (Thu, 30 Sep 2021)
Changed paths:
M llvm/include/llvm/CodeGen/BasicTTIImpl.h
M llvm/test/Analysis/CostModel/AArch64/arith-ssat.ll
M llvm/test/Analysis/CostModel/ARM/arith-overflow.ll
M llvm/test/Analysis/CostModel/ARM/arith-ssat.ll
M llvm/test/Analysis/CostModel/X86/arith-overflow.ll
M llvm/test/Analysis/CostModel/X86/arith-ssat.ll
M llvm/test/Transforms/LoopVectorize/AArch64/intrinsiccost.ll
M llvm/test/Transforms/LoopVectorize/ARM/mve-saddsatcost.ll
Log Message:
-----------
[CostModel] Update default cost model for sadd/ssub overflow to match TargetLowering
The expansion for these was updated in https://reviews.llvm.org/D47927 but the cost model was not adjusted.
I believe the cost model was also incorrect for the old expansion.
The expansion prior to D47927 used 3 icmps using LHS, RHS, and Result
to calculate theirs signs. Then 2 icmps to compare the signs. Followed
by an And. The previous cost model was using 3 icmps and 2 selects.
Digging back through git blame, those 2 selects in the cost model used to
be 2 icmps, but were changed in https://reviews.llvm.org/D90681
Differential Revision: https://reviews.llvm.org/D110739
More information about the All-commits
mailing list