This is an archive of the discontinued LLVM Phabricator instance.

Update ElementsAttr::isValidIndex to handle ElementsAttr with a scalar. Scalar will have rank 0.
ClosedPublic

Authored by karimnosseir on Jan 28 2021, 9:13 PM.

Details

Summary

Update ElementsAttr::isValidIndex to handle ElementsAttr with a scalar. Scalar will have rank 0.

Diff Detail

Event Timeline

karimnosseir created this revision.Jan 28 2021, 9:13 PM
karimnosseir requested review of this revision.Jan 28 2021, 9:13 PM

Can you add a test for this?

Added unit-test

Thanks River. PTAL

rriddle accepted this revision.Jan 29 2021, 4:15 PM

LGTM thanks.

mlir/unittests/IR/AttributeTest.cpp
195
This revision is now accepted and ready to land.Jan 29 2021, 4:15 PM

Updated test name

karimnosseir marked an inline comment as done.Jan 29 2021, 4:32 PM
This revision was landed with ongoing or failed builds.Jan 29 2021, 4:56 PM
This revision was automatically updated to reflect the committed changes.