Remove the assert from SelectionDAG::getZeroExtendInReg which checks that OpVT.isVector() == VT.isVector().
This assert was added in c41685b16fcceaa2078eb14eb27f6696f851eb49. This did some refactoring to reduce the number of calls to getScalarType.
If you're building stuff for arm64_32, it's possible to break this assumption.
E.g. in SelectionDAGBuilder::visitGetElementPtr:
MVT PtrTy = TLI.getPointerTy(DAG.getDataLayout(), AS); MVT PtrMemTy = TLI.getPointerMemTy(DAG.getDataLayout(), AS); ... if (PtrMemTy != PtrTy && !cast<GEPOperator>(I).isInBounds()) N = DAG.getPtrExtendInReg(N, dl, PtrMemTy);
All getPtrExtendInReg does is return getZeroExtendInReg. So, if N is a vector, we'll hit the assert.
Add a testcase to arm64_32-pointer-extend.ll that shows an example of this.
This bitLE check doesn't check what its intending to check if VT is a scalar and OpVT is a vector. Should probably check the bits of the scalar type.