1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/lib/Transforms
Simon Pilgrim 27264ddabe [TTI] Add DemandedElts to getScalarizationOverhead
The improvements to the x86 vector insert/extract element costs in D74976 resulted in the estimated costs for vector initialization and scalarization increasing higher than should be expected. This is particularly noticeable on pre-SSE4 targets where the available of legal INSERT_VECTOR_ELT ops is more limited.

This patch does 2 things:
1 - it implements X86TTIImpl::getScalarizationOverhead to more accurately represent the typical costs of a ISD::BUILD_VECTOR pattern.
2 - it adds a DemandedElts mask to getScalarizationOverhead to permit the SLP's BoUpSLP::getGatherCost to be rewritten to use it directly instead of accumulating raw vector insertion costs.

This fixes PR45418 where a v4i8 (zext'd to v4i32) was no longer vectorizing.

A future patch should extend X86TTIImpl::getScalarizationOverhead to tweak the EXTRACT_VECTOR_ELT scalarization costs as well.

Reviewed By: @craig.topper

Differential Revision: https://reviews.llvm.org/D78216
2020-04-29 12:00:38 +01:00
..
AggressiveInstCombine [ConstantFolding] Always return something from ConstantFoldConstant 2020-03-04 18:24:47 +01:00
CFGuard Add missing newlines at EOF; NFC 2020-02-12 15:57:25 +00:00
Coroutines [IR] Replace all uses of CallBase::getCalledValue() with getCalledOperand(). 2020-04-27 22:17:03 -07:00
Hello
InstCombine [InstCombine] Negator: 'or' with no common bits set is just 'add' 2020-04-28 19:16:32 +03:00
Instrumentation [llvm][NFC] Refactor APIs operating on CallBase 2020-04-28 13:23:47 -07:00
IPO [llvm][NFC] Refactor APIs operating on CallBase 2020-04-28 13:23:47 -07:00
ObjCARC [Pass] Ensure we don't include PassSupport.h or PassAnalysisSupport.h directly 2020-04-26 12:58:20 +01:00
Scalar [LAA] Move CheckingPtrGroup/PointerCheck outside class (NFC). 2020-04-28 21:47:31 +01:00
Utils [LAA] Move CheckingPtrGroup/PointerCheck outside class (NFC). 2020-04-28 21:47:31 +01:00
Vectorize [TTI] Add DemandedElts to getScalarizationOverhead 2020-04-29 12:00:38 +01:00
CMakeLists.txt
LLVMBuild.txt