File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -363,9 +363,13 @@ bool IndexedReference::tryDelinearizeFixedSize(
363363 return false ;
364364 }
365365
366- // Drop the last element of Sizes which is the same as ElementSize.
367- assert (!Sizes.empty () && Sizes.back () == ElementSize &&
368- " Expecting the last one to be the element size" );
366+ // We expect Sizes to have one more element than Subscripts, with the last one
367+ // is ElementSize. The last element of Sizes is for ensuring consistency with
368+ // the load/store instruction being analyzed. It is not needed for further
369+ // analysis.
370+ // TODO: Maybe this property should be enforced in delinearizeFixedSizeArray.
371+ assert (!Sizes.empty () && Subscripts.size () + 1 == Sizes.size () &&
372+ Sizes.back () == ElementSize && " Unexpected delinearization result" );
369373 Sizes.pop_back ();
370374 return true ;
371375}
You can’t perform that action at this time.
0 commit comments