Landing: 171a47f62d5a

Project / Subsystem

gcc / gcc/cris

Date

2026-08-27

Author

Roger Sayle

Commit

171a47f62d5a59f6b0d96ae5d5777279cc2009db

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
gcc/cris
patch_id
—
commit_hash
171a47f62d5a59f6b0d96ae5d5777279cc2009db
source_type
github
headline
CRIS: Add support for SWAP instruction variants
tldr
New patterns enable efficient use of CRIS architecture's SWAP instruction for bit manipulation and rotation.
author
Roger Sayle
outcome
committed
performance_win
true
breaking_change
false
series_id
—
series_parts
[]
tags
  • • cris
  • • optimization
  • • architecture
discussion_id_link
—
bugzilla_pr
—
date
2026-08-27T00:00:00.000Z

This commit enhances the CRIS backend by adding support for several variants of the SWAP instruction found in version 8 of the CRIS architecture. These new patterns allow GCC to efficiently implement operations like 32-bit rotates by 16 bits and bit reversal, significantly reducing code size and improving performance compared to previous manual implementations.