Prior to this change, LLVM would attempt to optimize an
aligned_alloc(33, ...) call to the stack. This flunked an assertion when
trying to emit the alloca, which crashed LLVM. Avoid that with extra
checks.
This was previously D119604, but when I landed that I missed a test
change and it was broken (and I was AFK, so a colleague rolled it back
for me.)
clang-format: please reformat the code