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

aarch64: Fix builtin folding for svwhile* builtins

Corrects an ICE in aarch64 SVE builtins when folding predicate-as-counter operations.

An ICE (Internal Compiler Error) in the aarch64 backend is fixed by correctly handling the svcount_t type in svwhilel*_c* builtins. The issue occurred when these builtins were incorrectly folded as predicate-as-mask operations. The fix ensures proper handling for predicate-as-counter scenarios and punts on unsupported cases.

In Details

This commit addresses an ICE in the GCC aarch64 backend's GIMPLE optimizer, specifically within the folding of SVE whilel* builtins. The problem arose from misinterpreting svcount_t (predicate-as-counter) as svpb (predicate-as-mask). The changes in aarch64-acle-builtins.cc and aarch64-sve-builtins-base.cc ensure correct type handling and introduce a punt for unsupported combinations, alongside new test cases.

Filed Under: aarch64compiler bug