This patch fix the following issues in InstCombiner::visitGetElementPtrInst
- Skip for scalable type if transformation requires fixed size number of vector element.
- Skip for scalable type if transformation relies on compile-time known type alloc size.
- Use VectorType::getElementCount when scalable property is used to construct new VectorType.
- Use TypeSize::getKnownMinSize when minimal size of a scalable type is valid to determine GEP 'inbounds'.
- Explicitly call TypeSize::getFixedSize to avoid implicit type conversion to uint64_t.
Can you just use DL.getTypeAllocSize(AI->getAllocatedType()).getKnownMinSize() here, instead of bailing out?