Landing: 093ffc54f4e5

Project / Subsystem

gcc / i386

Date

2026-06-09

Author

Uros Bizjak

Commit

093ffc54f4e5a8e1355e5d17fc6ee596983dbd65

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
i386
patch_id
commit_hash
093ffc54f4e5a8e1355e5d17fc6ee596983dbd65
source_type
github
headline
x86 backend now prefers MOVSBL for sign extension
tldr
GCC's i386 backend now always emits MOVSBL for QImode-to-HImode sign extensions, avoiding partial register writes and the 0x66 prefix.
author
Uros Bizjak
outcome
committed
performance_win
true
breaking_change
false
series_id
series_parts
[]
tags
  • i386
  • optimization
  • code generation
  • performance
discussion_id_link
bugzilla_pr
date
2026-06-09T00:00:00.000Z

The GCC i386 backend has been updated to consistently use the MOVSBL instruction for sign-extending an 8-bit value (QImode) to a 16-bit value (HImode). This change eliminates two performance-impacting issues: it avoids inefficient partial register writes, which can cause stalls, and it removes the need for the 0x66 operand size prefix. By standardizing on MOVSBL, the generated code for such sign extensions becomes both smaller and potentially faster on i386 architectures.