One of the ShuffleVectorOp::build functions checks if the incoming vector operands is scalable vector by casting its type to mlir::VectorType first. However, in some cases the operand is not necessarily mlir::VectorType (e.g. it might be a LLVMVectorType) so the casting will fail.
This patch fixes this issue by using the dedicated LLVM::isScalableVectorType function to determine if the incoming vector is scalable vector or not.
NOTE: Normally we will have a pure .mlir test for this kind of changes, but the affected ShuffleVectorOp::build function is not used by the MLIR parser (but used by the translator), so I only put a translator test here.