Landing: cc195978102e

Project / Subsystem

gcc / i386

Date

2026-10-04

Author

Roger Sayle

Commit

cc195978102e2076c4426b4dfbe457d2f223ae83

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
i386
patch_id
—
commit_hash
cc195978102e2076c4426b4dfbe457d2f223ae83
source_type
github
headline
Make x86 backend AOP-safe for shift instructions
tldr
Ensures x86 backend correctly recognizes shift instructions with OR, XOR, or PLUS operations.
author
Roger Sayle
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • i386
  • • x86
  • • optimization
  • • instruction selection
discussion_id_link
—
bugzilla_pr
—
date
2026-10-04T00:00:00.000Z

This patch modifies the i386 backend’s Machine Description (i386.md) to ensure it is “any-or-plus (AOP) safe”. This means the backend can now correctly recognize shld and shrd instructions when they are represented in RTL using PLUS, IOR, or XOR operations. This change is a prerequisite for fixing PR tree-optimization/108477 and includes documentation for the aop<mode>3 named pattern.