@@ -519,7 +519,7 @@ struct ConvertVectorStore final : OpConversionPattern<vector::StoreOp> {
519
519
520
520
auto origElements = valueToStore.getType ().getNumElements ();
521
521
// Note, per-element-alignment was already verified above.
522
- bool isFullyAligned = origElements % emulatedPerContainerElem == 0 ;
522
+ bool isDivisibleInSize = origElements % emulatedPerContainerElem == 0 ;
523
523
524
524
auto stridedMetadata =
525
525
rewriter.create <memref::ExtractStridedMetadataOp>(loc, op.getBase ());
@@ -535,8 +535,8 @@ struct ConvertVectorStore final : OpConversionPattern<vector::StoreOp> {
535
535
getAsOpFoldResult (adaptor.getIndices ()));
536
536
537
537
std::optional<int64_t > foldedNumFrontPadElems =
538
- isFullyAligned ? 0
539
- : getConstantIntValue (linearizedInfo.intraDataOffset );
538
+ isDivisibleInSize ? 0
539
+ : getConstantIntValue (linearizedInfo.intraDataOffset );
540
540
541
541
if (!foldedNumFrontPadElems) {
542
542
return rewriter.notifyMatchFailure (
@@ -554,7 +554,7 @@ struct ConvertVectorStore final : OpConversionPattern<vector::StoreOp> {
554
554
// need unaligned emulation because the store address is aligned and the
555
555
// source is a whole byte.
556
556
bool emulationRequiresPartialStores =
557
- !isFullyAligned || *foldedNumFrontPadElems != 0 ;
557
+ !isDivisibleInSize || *foldedNumFrontPadElems != 0 ;
558
558
if (!emulationRequiresPartialStores) {
559
559
// Basic case: storing full bytes.
560
560
auto numElements = origElements / emulatedPerContainerElem;
@@ -881,7 +881,7 @@ struct ConvertVectorLoad final : OpConversionPattern<vector::LoadOp> {
881
881
882
882
auto origElements = op.getVectorType ().getNumElements ();
883
883
// Note, per-element-alignment was already verified above.
884
- bool isFullyAligned = origElements % emulatedPerContainerElem == 0 ;
884
+ bool isDivisibleInSize = origElements % emulatedPerContainerElem == 0 ;
885
885
886
886
auto stridedMetadata =
887
887
rewriter.create <memref::ExtractStridedMetadataOp>(loc, op.getBase ());
@@ -897,8 +897,8 @@ struct ConvertVectorLoad final : OpConversionPattern<vector::LoadOp> {
897
897
getAsOpFoldResult (adaptor.getIndices ()));
898
898
899
899
std::optional<int64_t > foldedIntraVectorOffset =
900
- isFullyAligned ? 0
901
- : getConstantIntValue (linearizedInfo.intraDataOffset );
900
+ isDivisibleInSize ? 0
901
+ : getConstantIntValue (linearizedInfo.intraDataOffset );
902
902
903
903
// Always load enough elements which can cover the original elements.
904
904
int64_t maxintraDataOffset =
@@ -915,7 +915,7 @@ struct ConvertVectorLoad final : OpConversionPattern<vector::LoadOp> {
915
915
result = dynamicallyExtractSubVector (
916
916
rewriter, loc, dyn_cast<TypedValue<VectorType>>(result), resultVector,
917
917
linearizedInfo.intraDataOffset , origElements);
918
- } else if (!isFullyAligned ) {
918
+ } else if (!isDivisibleInSize ) {
919
919
result = staticallyExtractSubvector (
920
920
rewriter, loc, result, *foldedIntraVectorOffset, origElements);
921
921
}
@@ -1002,7 +1002,7 @@ struct ConvertVectorMaskedLoad final
1002
1002
auto origType = op.getVectorType ();
1003
1003
auto origElements = origType.getNumElements ();
1004
1004
// Note, per-element-alignment was already verified above.
1005
- bool isFullyAligned = origElements % emulatedPerContainerElem == 0 ;
1005
+ bool isDivisibleInSize = origElements % emulatedPerContainerElem == 0 ;
1006
1006
1007
1007
auto stridedMetadata =
1008
1008
rewriter.create <memref::ExtractStridedMetadataOp>(loc, op.getBase ());
@@ -1017,8 +1017,8 @@ struct ConvertVectorMaskedLoad final
1017
1017
getAsOpFoldResult (adaptor.getIndices ()));
1018
1018
1019
1019
std::optional<int64_t > foldedIntraVectorOffset =
1020
- isFullyAligned ? 0
1021
- : getConstantIntValue (linearizedInfo.intraDataOffset );
1020
+ isDivisibleInSize ? 0
1021
+ : getConstantIntValue (linearizedInfo.intraDataOffset );
1022
1022
1023
1023
int64_t maxIntraDataOffset =
1024
1024
foldedIntraVectorOffset.value_or (emulatedPerContainerElem - 1 );
@@ -1042,7 +1042,7 @@ struct ConvertVectorMaskedLoad final
1042
1042
passthru = dynamicallyInsertSubVector (
1043
1043
rewriter, loc, passthru, emptyVector, linearizedInfo.intraDataOffset ,
1044
1044
origElements);
1045
- } else if (!isFullyAligned ) {
1045
+ } else if (!isDivisibleInSize ) {
1046
1046
passthru = staticallyInsertSubvector (rewriter, loc, passthru, emptyVector,
1047
1047
*foldedIntraVectorOffset);
1048
1048
}
@@ -1070,7 +1070,7 @@ struct ConvertVectorMaskedLoad final
1070
1070
mask = dynamicallyInsertSubVector (rewriter, loc, mask, emptyMask,
1071
1071
linearizedInfo.intraDataOffset ,
1072
1072
origElements);
1073
- } else if (!isFullyAligned ) {
1073
+ } else if (!isDivisibleInSize ) {
1074
1074
mask = staticallyInsertSubvector (rewriter, loc, op.getMask (), emptyMask,
1075
1075
*foldedIntraVectorOffset);
1076
1076
}
@@ -1081,7 +1081,7 @@ struct ConvertVectorMaskedLoad final
1081
1081
result = dynamicallyExtractSubVector (
1082
1082
rewriter, loc, result, op.getPassThru (),
1083
1083
linearizedInfo.intraDataOffset , origElements);
1084
- } else if (!isFullyAligned ) {
1084
+ } else if (!isDivisibleInSize ) {
1085
1085
result = staticallyExtractSubvector (
1086
1086
rewriter, loc, result, *foldedIntraVectorOffset, origElements);
1087
1087
}
@@ -1159,7 +1159,7 @@ struct ConvertVectorTransferRead final
1159
1159
auto origElements = op.getVectorType ().getNumElements ();
1160
1160
1161
1161
// Note, per-element-alignment was already verified above.
1162
- bool isFullyAligned =
1162
+ bool isDivisibleInSize =
1163
1163
fitsInMultiByteContainerTy (op.getVectorType (), containerElemTy);
1164
1164
1165
1165
auto newPadding = rewriter.create <arith::ExtUIOp>(loc, containerElemTy,
@@ -1179,8 +1179,8 @@ struct ConvertVectorTransferRead final
1179
1179
getAsOpFoldResult (adaptor.getIndices ()));
1180
1180
1181
1181
std::optional<int64_t > foldedIntraVectorOffset =
1182
- isFullyAligned ? 0
1183
- : getConstantIntValue (linearizedInfo.intraDataOffset );
1182
+ isDivisibleInSize ? 0
1183
+ : getConstantIntValue (linearizedInfo.intraDataOffset );
1184
1184
1185
1185
int64_t maxIntraDataOffset =
1186
1186
foldedIntraVectorOffset.value_or (emulatedPerContainerElem - 1 );
@@ -1204,7 +1204,7 @@ struct ConvertVectorTransferRead final
1204
1204
result = dynamicallyExtractSubVector (rewriter, loc, bitCast, zeros,
1205
1205
linearizedInfo.intraDataOffset ,
1206
1206
origElements);
1207
- } else if (!isFullyAligned ) {
1207
+ } else if (!isDivisibleInSize ) {
1208
1208
result = staticallyExtractSubvector (
1209
1209
rewriter, loc, result, *foldedIntraVectorOffset, origElements);
1210
1210
}
0 commit comments