Commit 6170272a authored by Amara Emerson's avatar Amara Emerson
Browse files

[AArch64][GlobalISel] Disallow vectors in convertPtrAddToAdd.

Found by inspection, but there's no test for this yet because G_PTR_ADD is
currently illegal for vectors. I'll add the test at a later time when the
legalizer support has landed.
parent 48039103
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1399,6 +1399,10 @@ bool AArch64InstructionSelector::convertPtrAddToAdd(
  if (PtrTy.getAddressSpace() != 0)
    return false;

  // Only do this for scalars for now.
  if (PtrTy.isVector())
    return false;

  MachineIRBuilder MIB(I);
  const LLT s64 = LLT::scalar(64);
  auto PtrToInt = MIB.buildPtrToInt(s64, AddOp1Reg);