AArch64 & ARM: remove undefined behaviour from some tests.