GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
aarch64

aarch64: Fix ICE in aarch64_evpc_rev64_ext for testing_p case

Resolves an internal compiler error (ICE) on AArch64 by correctly handling a specific expansion case related to loop testing.

An internal compiler error occurred in the AArch64 backend when expanding a permutation instruction under certain loop-testing conditions. This fix adjusts the order of checks within the aarch64_evpc_rev64_ext function, ensuring that the test for whether the expansion statement has an associated basic block is performed correctly before checking if it’s within a loop. This prevents an ICE and ensures correct code generation.

In Details

The AArch64 backend's aarch64_evpc_rev64_ext function, used for expanding the EVPC_REV64 intrinsic, had a bug related to the testing_p condition. When the expansion statement lacked a basic block (bb), an ICE could occur. This patch reorders the checks: is_bb_in_loop is now checked before testing_p. This ensures that if a bb doesn't exist, the testing_p logic, which might rely on bb properties, isn't prematurely evaluated, thus avoiding the ICE.

For Context
AArch64
The 64-bit ARM architecture, widely used in mobile devices, servers, and embedded systems.
ICE
Internal Compiler Error. A serious bug within the compiler itself, often caused by unexpected code paths or data states, leading to a crash rather than a compilation failure.
basic block (bb)
A sequence of code instructions with a single entry point and a single exit point. Basic blocks are fundamental units for compiler analysis and optimization.
expansion
In the context of compiler intrinsics or complex instructions, expansion refers to the process of replacing a single high-level instruction or intrinsic call with a sequence of lower-level instructions.
Filed Under: aarch64compilerICEbackend