Recommit D102489, with the test case requiring the AArch64 backend. This reverts the revert 59b419ad.