D98718 caused the order of Values/MemoryLocations we pass to alias() to
be significant due to storing the offset in the PartialAlias case. But
some callers weren't audited and were still passing swapped arguments,
causing the returned PartialAlias offset to be negative in some
cases. For example, the newly added unittests would return -1
instead of 1.
Fixes #55343, a miscompile.
Would it be possible to drop the default zero argument for new APIs? Defaulting to AS0 instead of explicitly passing address spaces often causes assertion errors for targets such as AVR or the downstream CHERI-RISC-V and Arm Morello targets.