[llvm] Add SD matchers and unit test coverage for ISD::VECTOR_SHUFFLE (PR #119592)
Min-Yih Hsu via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 19 11:11:01 PST 2024
================
@@ -119,6 +119,33 @@ TEST_F(SelectionDAGPatternMatchTest, matchValueType) {
EXPECT_FALSE(sd_match(Op2, m_ScalableVectorVT()));
}
+TEST_F(SelectionDAGPatternMatchTest, matchVecShuffle) {
+ SDLoc DL;
+ auto Int32VT = EVT::getIntegerVT(Context, 32);
+ auto VInt32VT = EVT::getVectorVT(Context, Int32VT, 4);
+ SmallVector<int, 4> MaskData = {2, 0, 3, 1};
+ SmallVector<int, 4> otherMaskData = {1, 2, 3, 4};
----------------
mshockwave wrote:
nit: can we use `const std::array<int, 4>` here instead of SmallVector?
https://github.com/llvm/llvm-project/pull/119592
More information about the llvm-commits
mailing list