[InstCombine] Fold getelementptr patterns to @llvm.ptrmask
@llvm.ptrmask is documented as being equivilent to:
(getelementptr i8 Ptr, (sub (and (ptrtoint Ptr), Mask), (ptrtoint Ptr)))
See: https://llvm.org/docs/LangRef.html#llvm-ptrmask-intrinsic
As well clang's __builtin_align_up and __builtin_align_down emit
patterns that can be folded to pointer mask.
Handle all three.
This is not legal, because it does not preserve pointer provenance. This one even fails to preserve it in a particularly catastrophic way, because the resulting pointer has nullary provenance (i.e. it is UB to perform any accesses through it).