There has been a lot of confusion on this in the past (see for example https://reviews.llvm.org/D110634 and earlier revisions), so let's try to get some clarity here. This patch specifies that a) specifying a non-constant assumed alignment is explicitly allowed and b) an invalid (non-power-of-two) alignment is not UB, but rather converts it into an assumption that the pointer is null.
This change is done for two reasons: a) Assume operand bundles are specifically used in cases where the alignment is not known during frontend codegen (otherwise we'd just use an align attribute), so rejecting this case doesn't make sense. b) At least for aligned_alloc the C standard specifies that passing an invalid alignment results in a null pointer, not undefined behavior.