Fix a couple of things that were causing stack protection to not work correctly in functions that have scalable vectors on the stack:
- Fix an assertion failure in the StackProtector pass caused by trying to call getTypeAllocSize on a scalable vector.
- When stack protection is enabled move the stack protector location to the top of the SVE locals, so that any overflow in them (or the other locals which are below that) will be detected.
Fixes PR51795.
This should use TypeSize::isKnownGT(Typesize::getFixed(MemLoc->Size.getValue()), AllocSize).
I doubt it would ever return true when AllocSize is scalable though, becuase from what I can see in the code, MemLoc.hasValue() will return false if I accesses a scalable size, because MemoryLocation will not be precise.