Landing: d33d3552eb80

Project / Subsystem

gcc / gcc

Date

2026-09-27

Author

Roger Sayle

Commit

d33d3552eb807d64d05f0732ff9003bfae706f03

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
gcc
patch_id
—
commit_hash
d33d3552eb807d64d05f0732ff9003bfae706f03
source_type
github
headline
Improve iq2000 port code for AOR optabs and IOR with 0x0
tldr
Optimizes iq2000 port by using IOR over PLUS for equivalent operations and simplifying IOR with zero.
author
Roger Sayle
outcome
committed
performance_win
true
breaking_change
false
series_id
—
series_parts
[]
tags
  • • iq2000
  • • optimization
  • • code generation
discussion_id_link
—
bugzilla_pr
—
date
2026-09-27T00:00:00.000Z

This commit improves code generation for the iq2000 port by steering the AOR (Arithmetic OR) optab to use IOR instead of PLUS when they are equivalent. It also optimizes the low-part IOR operation when one operand is zero, transforming it into a simple copy. For constant loads, this means emitting only the LUI instruction. These changes resolve poor code generation issues previously observed for the iq2000 port.