Landing: 76dad9582058

Project / Subsystem

gcc / arc

Date

2026-09-17

Author

Michiel Derhaeg

Commit

76dad9582058739e3e5f6d4db10c3c2e4de27a32

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
arc
patch_id
—
commit_hash
76dad9582058739e3e5f6d4db10c3c2e4de27a32
source_type
github
headline
arc: Add missing condition code clobbers to prevent incorrect code
tldr
Fixed ARC target by declaring missing condition code clobbers in instruction patterns, resolving incorrect code generation.
author
Michiel Derhaeg
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • gcc
  • • arc
  • • target
  • • bugfix
  • • code-generation
discussion_id_link
—
bugzilla_pr
—
date
2026-09-17T00:00:00.000Z

This commit addresses an issue in the ARC target architecture where several instructions (doloop_end, loop_end, dbnz, flag, kflag) incorrectly modified condition codes without declaring this side effect. Due to a recent change moving AArch64 CC fusion into late-combine, GCC now keeps condition codes live across these instructions, leading to wrong code generation. By adding the necessary CC clobber declarations to the instruction patterns, GCC correctly accounts for these side effects, fixing bugs like PR68185 for ARC60x and ARC700.