@@ -472,11 +472,8 @@ LogicalResult PrefetchNdOp::verify() {
472472 return emitOpError (" invalid l3_hint: " ) << getL3HintAttr ();
473473
474474 int64_t tDescRank = tdescTy.getRank ();
475- int64_t offsetSize = static_cast <int64_t >(getOffsets ().size ());
476- int64_t constOffsetSize =
477- getConstOffsetsAttr () ? getConstOffsetsAttr ().size () : 0 ;
478- if (((offsetSize != 0 ) && (offsetSize != tDescRank)) ||
479- ((constOffsetSize != 0 ) && (constOffsetSize != tDescRank)))
475+ int64_t offsetSize = getMixedOffsets ().size ();
476+ if (offsetSize != 0 && offsetSize != tDescRank)
480477 return emitOpError (
481478 " Mismatched ranks between offsets and tensor descriptor" );
482479
@@ -597,11 +594,8 @@ LogicalResult LoadNdOp::verify() {
597594 << tdescTy;
598595
599596 int64_t tDescRank = tdescTy.getRank ();
600- int64_t offsetSize = static_cast <int64_t >(getOffsets ().size ());
601- int64_t constOffsetSize =
602- getConstOffsetsAttr () ? getConstOffsetsAttr ().size () : 0 ;
603- if (((offsetSize != 0 ) && (offsetSize != tDescRank)) ||
604- ((constOffsetSize != 0 ) && (constOffsetSize != tDescRank)))
597+ int64_t offsetSize = getMixedOffsets ().size ();
598+ if (offsetSize != 0 && offsetSize != tDescRank)
605599 return emitOpError (
606600 " Mismatched ranks between offsets and tensor descriptor" );
607601
@@ -691,11 +685,8 @@ LogicalResult StoreNdOp::verify() {
691685 << dstTy;
692686
693687 int64_t tDescRank = dstTy.getRank ();
694- int64_t offsetSize = static_cast <int64_t >(getOffsets ().size ());
695- int64_t constOffsetSize =
696- getConstOffsetsAttr () ? getConstOffsetsAttr ().size () : 0 ;
697- if (((offsetSize != 0 ) && (offsetSize != tDescRank)) ||
698- ((constOffsetSize != 0 ) && (constOffsetSize != tDescRank)))
688+ int64_t offsetSize = getMixedOffsets ().size ();
689+ if (offsetSize != 0 && offsetSize != tDescRank)
699690 return emitOpError (
700691 " Mismatched ranks between offsets and tensor descriptor" );
701692
0 commit comments