This is an archive of the discontinued LLVM Phabricator instance.

Don't drop in_bounds when vector-transfer-collapse-inner-most-dims
ClosedPublic

Authored by asaadaldien on Oct 28 2021, 5:40 PM.

Details

Summary

When operand is a subview we don't infer in_bounds and some default cases (e.g case in the tests) will crash with operand is NULL when converting to LLVM

Diff Detail

Event Timeline

asaadaldien created this revision.Oct 28 2021, 5:40 PM
asaadaldien requested review of this revision.Oct 28 2021, 5:40 PM
ThomasRaoux accepted this revision.Oct 28 2021, 11:03 PM
ThomasRaoux added inline comments.
mlir/lib/Dialect/Vector/VectorTransforms.cpp
3577–3583

nit: you could also do this:

ArrayAttr inBounds =  readOp.in_bounds() ? rewriter.getArrayAttr( readOp.in_boundsAttr().getValue().drop_back(dimsToDrop))
            : ArrayAttr()
This revision is now accepted and ready to land.Oct 28 2021, 11:03 PM
ThomasRaoux added inline comments.Oct 28 2021, 11:03 PM
mlir/test/Dialect/Vector/vector-transfer-collapse-inner-most-dims.mlir
34–35

please remove the extra lines