OSDN Git Service

[CostModel][X86][AArch64] Adjust cost of the scalarization part of min/max reduction.
authorCraig Topper <craig.topper@intel.com>
Mon, 10 Dec 2018 06:58:58 +0000 (06:58 +0000)
committerCraig Topper <craig.topper@intel.com>
Mon, 10 Dec 2018 06:58:58 +0000 (06:58 +0000)
commit24a384d4a6c4c1c8e8126c328346f734306a89de
treeba697fe01e845cd1fba57582b765f84c1c63babc
parent8778ec7d1ac94b61837abd02077f990b0153a2f3
[CostModel][X86][AArch64] Adjust cost of the scalarization part of min/max reduction.

Summary: The comment says we need 3 extracts and a select at the end. But didn't we just account for the select in the vector cost above. Aren't we just extracting the single element after taking the min/max in the vector register?

Reviewers: RKSimon, spatel, ABataev

Reviewed By: RKSimon

Subscribers: javed.absar, kristof.beyls, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348739 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/BasicTTIImpl.h
test/Analysis/CostModel/AArch64/vector-reduce.ll
test/Analysis/CostModel/X86/reduce-smax-widen.ll
test/Analysis/CostModel/X86/reduce-smax.ll
test/Analysis/CostModel/X86/reduce-smin-widen.ll
test/Analysis/CostModel/X86/reduce-smin.ll
test/Analysis/CostModel/X86/reduce-umax-widen.ll
test/Analysis/CostModel/X86/reduce-umax.ll
test/Analysis/CostModel/X86/reduce-umin-widen.ll
test/Analysis/CostModel/X86/reduce-umin.ll
test/Transforms/SLPVectorizer/X86/horizontal-minmax.ll