[llvm] [CodeGen] Expand unsupported (de)interleave intrinsics (PR #207439)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 14 00:07:17 PDT 2026


================
@@ -3301,6 +3300,13 @@ class LLVM_ABI TargetLoweringBase {
   /// Default to be the minimum interleave factor: 2.
   virtual unsigned getMaxSupportedInterleaveFactor() const { return 2; }
 
+  /// Return true if a fixed-length VECTOR_INTERLEAVE / VECTOR_DEINTERLEAVE
+  /// should be expanded to a shufflevector sequence.
+  virtual bool shouldExpandVectorInterleaveToShuffle(unsigned Factor,
----------------
lukel97 wrote:

I also think it would be nice to avoid yet another TTI hook. Especially since we already have `TLI->isLegalInterleavedAccessType`, this is a bit confusing.

I wouldn't be opposed to just splitting out `VECTOR_[DE]INTERLEAVE` into `VECTOR_[DE]INTERLEAVE{2,3,4,5,6,7,8}`. It would be more consistent with the intrinsics and let targets just mark which factors are legal. It would also let us properly define SDTypeProfiles for the SDNodes, instead of having it be variadic. 

https://github.com/llvm/llvm-project/pull/207439


More information about the llvm-commits mailing list