Particularly this breaks vectorization of insertelements where some of
intermediate (i.e. not last) insertelements are used externally.
Fixes PR52275
Fixes #51617
Paths
| Differential D119679
[SLP] Don't try to vectorize pair with insertelement ClosedPublic Authored by anton-afanasyev on Feb 13 2022, 1:12 PM.
Details Summary Particularly this breaks vectorization of insertelements where some of Fixes PR52275
Diff Detail
Event Timeline
anton-afanasyev added inline comments.
anton-afanasyev retitled this revision from [SLP] Prohibit vectorization of externally used intermediate insertelements to [SLP] Don't try to vectorize pair with insertelement.Feb 14 2022, 1:27 AM Comment Actions LG
This revision is now accepted and ready to land.Feb 14 2022, 3:14 AM anton-afanasyev added inline comments.
This revision was landed with ongoing or failed builds.Feb 15 2022, 5:13 AM Closed by commit rGb7574b092a97: [SLP] Don't try to vectorize pair with insertelement (authored by anton-afanasyev). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 408827 llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/X86/pr52275.ll
|
I would try to do this a bit earlier and simpler. Before calling tryToVectorizePair (or something like this) it is just enough to check that one of the instructions is insertelement. And just do not try vectorization in this case.