@@ -1288,10 +1288,10 @@ void MachineVerifier::verifyPreISelGenericInstruction(const MachineInstr *MI) {
12881288 if (!DstTy.isValid () || !PtrTy.isValid () || !OffsetTy.isValid ())
12891289 break ;
12901290
1291- if (!PtrTy.getScalarType (). isPointer ())
1291+ if (!PtrTy.isPointerOrPointerVector ())
12921292 report (" gep first operand must be a pointer" , MI);
12931293
1294- if (OffsetTy.getScalarType (). isPointer ())
1294+ if (OffsetTy.isPointerOrPointerVector ())
12951295 report (" gep offset operand must not be a pointer" , MI);
12961296
12971297 // TODO: Is the offset allowed to be a scalar with a vector?
@@ -1304,7 +1304,7 @@ void MachineVerifier::verifyPreISelGenericInstruction(const MachineInstr *MI) {
13041304 if (!DstTy.isValid () || !SrcTy.isValid () || !MaskTy.isValid ())
13051305 break ;
13061306
1307- if (!DstTy.getScalarType (). isPointer ())
1307+ if (!DstTy.isPointerOrPointerVector ())
13081308 report (" ptrmask result type must be a pointer" , MI);
13091309
13101310 if (!MaskTy.getScalarType ().isScalar ())
@@ -1330,15 +1330,13 @@ void MachineVerifier::verifyPreISelGenericInstruction(const MachineInstr *MI) {
13301330 if (!DstTy.isValid () || !SrcTy.isValid ())
13311331 break ;
13321332
1333- LLT DstElTy = DstTy.getScalarType ();
1334- LLT SrcElTy = SrcTy.getScalarType ();
1335- if (DstElTy.isPointer () || SrcElTy.isPointer ())
1333+ if (DstTy.isPointerOrPointerVector () || SrcTy.isPointerOrPointerVector ())
13361334 report (" Generic extend/truncate can not operate on pointers" , MI);
13371335
13381336 verifyVectorElementMatch (DstTy, SrcTy, MI);
13391337
1340- unsigned DstSize = DstElTy. getSizeInBits ();
1341- unsigned SrcSize = SrcElTy. getSizeInBits ();
1338+ unsigned DstSize = DstTy. getScalarSizeInBits ();
1339+ unsigned SrcSize = SrcTy. getScalarSizeInBits ();
13421340 switch (MI->getOpcode ()) {
13431341 default :
13441342 if (DstSize <= SrcSize)
0 commit comments