When the cost of load/store is estimated in SLP vectorization, constant "1" was always given to the cost model. This caused over estimate the cost of sequential version in some architectures that care about the alignment (such as PPC). The fix is to add alignment info.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
updates based on the comments:
yes, the alignment for vector type is changed
clang-format is used
Comment Actions
Please add a test case. It should go in test/Transforms/SLPVectorizer/PowerPC (this directory does not currently exist, but please create it -- you'll need to add a lit.local.cfg file to the directory as well (just like test/Transforms/SLPVectorizer/X86/lit.local.cfg, but editing the file to change 'X86' to 'PowerPC').
Please run clang-format on the patch.