GCC Newspaper
JUNE 15, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
combine

Combine pass checks for CLOBBER in `make_compound_operation_int`.

This commit prevents an ICE in the combine pass by checking for CLOBBER instructions before calling `simplify_subreg`.

The combine pass was triggering a gcc_assert failure when make_compound_operation_int received a CLOBBER instruction and then called simplify_subreg with an invalid mode. This commit fixes the issue by checking for CLOBBER instructions before calling simplify_subreg and returning NULL_RTX if one is encountered, preventing the ICE.

In Details

The combine pass simplifies RTL instructions. This commit addresses a bug where a CLOBBER instruction could be propagated to make_compound_operation, which would then incorrectly call simplify_subreg, leading to a gcc_assert failure. The fix involves checking for CLOBBER before calling simplify_subreg within make_compound_operation_int in combine.cc. The CLOBBER instruction indicates that a register's value is no longer valid.

For Context

The combine pass in GCC optimizes code by combining and simplifying RTL (Register Transfer Language) instructions. This commit fixes an internal compiler error (ICE) that could occur during this process. The error happened when the compiler encountered a CLOBBER instruction, which indicates that the value of a register is no longer valid. The fix ensures that the compiler handles CLOBBER instructions correctly, preventing the ICE and ensuring correct code generation.

Filed Under: combinebugfixrtl-optimization