llvm-project/llvm/test/Transforms/SLPVectorizer
Florian Hahn eb46137daa [SLP] Make sure instructions are ordered when computing spill cost.
The entries in VectorizableTree are not necessarily ordered by their
position in basic blocks. Collect them and order them by dominance so
later instructions are guaranteed to be visited first. For instructions
in different basic blocks, we only scan to the beginning of the block,
so their order does not matter, as long as all instructions in a basic
block are grouped together. Using dominance ensures a deterministic order.

The modified test case contains an example where we compute a wrong
spill cost (2) without this patch, even though there is no call between
any instruction in the bundle.

This seems to have limited practical impact, .e.g on X86 with a recent
Intel Xeon CPU with -O3 -march=native -flto on MultiSource,SPEC2000,SPEC2006
there are no binary changes.

Reviewers: craig.topper, RKSimon, xbolva00, ABataev, spatel

Reviewed By: ABataev

Differential Revision: https://reviews.llvm.org/D82444
2020-07-03 17:30:17 +01:00
..
AArch64 [SLP] Make sure instructions are ordered when computing spill cost. 2020-07-03 17:30:17 +01:00
AMDGPU AMDGPU: Allow vectorization of round intrinsic 2020-03-23 17:00:41 -04:00
ARM [NewPM][BasicAA] basicaa -> basic-aa in Transforms/SLPVectorizer 2020-06-26 14:58:41 -07:00
NVPTX [NewPM][BasicAA] basicaa -> basic-aa in Transforms/SLPVectorizer 2020-06-26 14:58:41 -07:00
PowerPC Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
SystemZ [lit] Delete empty lines at the end of lit.local.cfg NFC 2019-06-17 09:51:07 +00:00
X86 [NewPM][BasicAA] basicaa -> basic-aa in Transforms/SLPVectorizer 2020-06-26 14:58:41 -07:00
XCore [NewPM][BasicAA] basicaa -> basic-aa in Transforms/SLPVectorizer 2020-06-26 14:58:41 -07:00
int_sideeffect.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
slp-max-phi-size.ll Pre-commited test update. NFC. 2020-06-22 08:10:20 -07:00