Landing: c8c3988ef66c

Project / Subsystem

gcc / xtensa

Date

2026-07-17

Author

Takayuki 'January June' Suwa

Commit

c8c3988ef66c112defe86dcd23e6679d39814587

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
xtensa
patch_id
commit_hash
c8c3988ef66c112defe86dcd23e6679d39814587
source_type
github
headline
Define LOCAL_REGNO() macro for Xtensa TARGET_WINDOWED_ABI.
tldr
Fixes phantom DF livenesses and improves optimization in Xtensa.
author
Takayuki 'January June' Suwa
outcome
committed
performance_win
true
breaking_change
false
series_id
series_parts
[]
tags
  • xtensa
  • optimization
  • abi
discussion_id_link
bugzilla_pr
date
2026-07-17T00:00:00.000Z

This commit defines the LOCAL_REGNO() macro for the Xtensa target when the TARGET_WINDOWED_ABI option is enabled. Without this macro, the compiler incorrectly identifies phantom ‘DF’ (Data Flow) livenesses in the function epilogue. This incorrect liveness information hinders optimizations, such as low-overhead loop optimization, by causing the epilogue basic block to be incorrectly perceived as using loop variables. Defining LOCAL_REGNO() resolves this issue, enabling better optimization.