[RISCV][NFC] Share interleave mask checking logic
authorLuke Lau <luke@igalia.com>
Mon, 13 Mar 2023 18:12:12 +0000 (18:12 +0000)
committerLuke Lau <luke@igalia.com>
Tue, 14 Mar 2023 11:02:52 +0000 (11:02 +0000)
commita9d9616c0de3f07654ee139bead48b8d78f44e1f
treeb2d4b0c3a41e7ae36a3d10b0dd3b8d9c7d2671fd
parent0e79106fc970b79c9b711c58d2145026b1fd2a00
[RISCV][NFC] Share interleave mask checking logic

This adds two new methods to ShuffleVectorInst, isInterleave and
isInterleaveMask, so that the logic to check if a shuffle mask is an
interleave can be shared across the TTI, codegen and the interleaved
access pass.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D145971
llvm/include/llvm/IR/Instructions.h
llvm/lib/CodeGen/InterleavedAccessPass.cpp
llvm/lib/IR/Instructions.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
llvm/test/Analysis/CostModel/RISCV/shuffle-interleave.ll
llvm/unittests/IR/ShuffleVectorInstTest.cpp