[llvm] [IA] Fix crash when dealing with deinterleave(interleave) (PR #150713)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 26 11:23:44 PDT 2025


https://github.com/preames commented:

There should be no code changed needed in lowerInterleavedLoad, or lowerInterleavedStore.  The condition is checked by the caller. We do need an update to lowerInterleaveIntrinsic and lowerDeinterleaveIntrinsic as it looks like I dropped the check in the refactor which introduced getMaskOperand (as you note).  

The simplest fix is probably to add:
if (II && II->getIntrinsicID() != Intrinsic::masked_load && 
    II->getIntrinsicID() != Intrinsic::vp_load)
  return false

To the just after the II variable is created.  (Next to where we have the LI->isSimple check).

If you want to do that, please feel free.  Otherwise, I'll post a patch Monday morning.  

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


More information about the llvm-commits mailing list