D104809 changed buildTree_rec to check for extract element instructions
with scalable types. However, if the extract is extended or truncated,
these changes do not apply and we assert later on in isShuffle(), which
attempts to cast the type of the extract to FixedVectorType.
Details
Diff Detail
Unit Tests
Event Timeline
Hi @ABataev, I've added a fix for this assertion failure in the same place as you suggested on a previous patch, D104809. Since this is quite similar and there would now be two fixes in buildTree_rec for the same issue, I was wondering if you think it's worth revisiting the fix @CarolineConcatto first proposed on that patch? Her first revision added the phiNodeHasScalableOp & basicBlockHasScalableOp functions to avoid vectorizing early if there are any instructions found with scalable types.
I think the current implementation is still good. Also, isShuffle is called in several places, which one causes the crash?
In D110640#3028021, @ABataev wrote:
I think the current implementation is still good. Also, isShuffle is called in several places, which one causes the crash?
It's the isShuffle call in isFullyVectorizableTinyTree that caused the crash here, which was reached through vectorizeGEPIndices->tryToVectorizeList.
Alternatively, do we want to rename isShuffle to isFixedVectorShuffle and return None if the extract-element's vector operand type is scalable?
- Removed changes to buildTree_rec.
- Renamed isShuffle to isFixedVectorShuffle and changed this to return None if the type of the extract element instruction is scalable.