summaryrefslogtreecommitdiff
path: root/llvm/unittests/Transforms/Vectorize/SandboxVectorizer/InstrMapsTest.cpp
AgeCommit message (Collapse)Author
2025-02-20[SandboxVec][BottomUpVec] Separate vectorization decisions from code ↵vporpo
generation (#127727) Up until now the generation of vector instructions was taking place during the top-down post-order traversal of vectorizeRec(). The issue with this approach is that the vector instructions emitted during the traversal can be reordered by the scheduler, making it challenging to place them without breaking the def-before-uses rule. With this patch we separate the vectorization decisions (done in `vectorizeRec()`) from the code generation phase (`emitVectors()`). The vectorization decisions are stored in the `Actions` vector and are used by `emitVectors()` to drive code generation.
2025-02-12[SandboxVec][Legality] Fix mask on diamond reuse with shuffle (#126963)vporpo
This patch fixes a bug in the creation of shuffle masks when vectorizing vectors in case of a diamond reuse with shuffle. The mask needs to enumerate all elements of a vector, not treat the original vector value as a single element. That is: if vectorizing two <2 x float> vectors into a <4 x float> the mask needs to have 4 indices, not just 2.
2025-01-17[SandboxVectorizer] Fix a warningKazu Hirata
This patch fixes: third-party/unittest/googletest/include/gtest/gtest.h:1379:11: error: comparison of integers of different signs: 'const unsigned int' and 'const int' [-Werror,-Wsign-compare]
2025-01-17[SandboxVec][InstrMaps] EraseInstr callback (#123256)vporpo
This patch hooks up InstrMaps to the Sandbox IR callbacks such that it gets updated when instructions get erased.
2025-01-16[Vectorize] Fix warningsKazu Hirata
This patch fixes: third-party/unittest/googletest/include/gtest/gtest.h:1379:11: error: comparison of integers of different signs: 'const unsigned int' and 'const int' [-Werror,-Wsign-compare] llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/InstrMaps.h:57:12: error: unused variable 'Pair' [-Werror,-Wunused-variable]
2025-01-16[SandboxVec][BottomUpVec] Implement InstrMaps (#122848)vporpo
InstrMaps is a helper data structure that maps scalars to vectors and the reverse. This is used by the vectorizer to figure out which vectors it can extract scalar values from.