File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -1230,17 +1230,16 @@ bool NVPTXDAGToDAGISel::tryLDGLDU(SDNode *N) {
1230
1230
if (EltVT.isVector ()) {
1231
1231
NumElts = EltVT.getVectorNumElements ();
1232
1232
EltVT = EltVT.getVectorElementType ();
1233
- // vectors of 16bits type are loaded/stored as multiples of v2x16 elements.
1233
+ // vectors of 8/16bits type are loaded/stored as multiples of v4i8/v2x16
1234
+ // elements.
1234
1235
if ((EltVT == MVT::f16 && OrigType == MVT::v2f16) ||
1235
1236
(EltVT == MVT::bf16 && OrigType == MVT::v2bf16) ||
1236
- (EltVT == MVT::i16 && OrigType == MVT::v2i16)) {
1237
- assert (NumElts % 2 == 0 && " Vector must have even number of elements" );
1237
+ (EltVT == MVT::i16 && OrigType == MVT::v2i16) ||
1238
+ (EltVT == MVT::i8 && OrigType == MVT::v4i8)) {
1239
+ assert (NumElts % OrigType.getVectorNumElements () == 0 &&
1240
+ " NumElts must be divisible by the number of elts in subvectors" );
1238
1241
EltVT = OrigType;
1239
- NumElts /= 2 ;
1240
- } else if (OrigType == MVT::v4i8) {
1241
- assert (NumElts % 4 == 0 && " NumElts must be a multuple of 4" );
1242
- EltVT = OrigType;
1243
- NumElts /= 4 ;
1242
+ NumElts /= OrigType.getVectorNumElements ();
1244
1243
}
1245
1244
}
1246
1245
You can’t perform that action at this time.
0 commit comments