]> granicus.if.org Git - llvm/commit
[TTI] Add generic SADDSAT/SSUBSAT costs
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 27 Jan 2019 13:51:59 +0000 (13:51 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 27 Jan 2019 13:51:59 +0000 (13:51 +0000)
commit06a647df6d134948593050a5096b1b660ba7b41c
tree36aa39454dfb922dd9b18f17e979b3a12d6e9bf1
parentc90af59bb37a6ad5215c1c387e3a657d3f5e299b
[TTI] Add generic SADDSAT/SSUBSAT costs

Add generic costs calculation for SADDSAT/SSUBSAT intrinsics, this uses generic costs for sadd_with_overflow/ssub_with_overflow, an extra sign comparison + a selects based on the sign/overflow.

This completes PR40316

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352315 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/BasicTTIImpl.h
test/Analysis/CostModel/X86/arith-ssat.ll
test/Transforms/SLPVectorizer/X86/arith-add-ssat.ll
test/Transforms/SLPVectorizer/X86/arith-sub-ssat.ll