[PATCH] D110739: [CostModel] Update default cost model for sadd/ssub overflow to match TargetLowering
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 29 10:45:33 PDT 2021
craig.topper created this revision.
craig.topper added reviewers: spatel, rogfer01, RKSimon.
Herald added a subscriber: dmgreen.
craig.topper requested review of this revision.
Herald added a project: LLVM.
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 <https://reviews.llvm.org/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 used to be 2 icmps, but were changed in https://reviews.llvm.org/D90681
https://reviews.llvm.org/D110739
Files:
llvm/include/llvm/CodeGen/BasicTTIImpl.h
llvm/test/Analysis/CostModel/AArch64/arith-ssat.ll
llvm/test/Analysis/CostModel/ARM/arith-overflow.ll
llvm/test/Analysis/CostModel/ARM/arith-ssat.ll
llvm/test/Analysis/CostModel/X86/arith-overflow.ll
llvm/test/Analysis/CostModel/X86/arith-ssat.ll
llvm/test/Transforms/LoopVectorize/AArch64/intrinsiccost.ll
llvm/test/Transforms/LoopVectorize/ARM/mve-saddsatcost.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110739.375956.patch
Type: text/x-patch
Size: 314365 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210929/8fbf3465/attachment-0001.bin>
More information about the llvm-commits
mailing list