Landing: c8a9bc5cf5d7

Project / Subsystem

gcc / i386

Date

2026-08-28

Author

Hongyu Wang

Commit

c8a9bc5cf5d788a3bc796341f8070d073076b91b

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
i386
patch_id
—
commit_hash
c8a9bc5cf5d788a3bc796341f8070d073076b91b
source_type
github
headline
Allow round for HFmode in i386 optab hook to aid vectorization.
tldr
Enables the 'round' operation for 16-bit float (HFmode) in the i386 backend's optab hook, preventing unnecessary conversions during vectorization.
author
Hongyu Wang
outcome
committed
performance_win
true
breaking_change
false
series_id
—
series_parts
[]
tags
  • • i386
  • • vectorization
  • • optimization
  • • float16
discussion_id_link
—
bugzilla_pr
—
date
2026-08-28T00:00:00.000Z

This change updates the i386 backend’s ix86_optab_supported_p function to recognize the ‘round’ operation for HFmode (_Float16). Previously, this was not explicitly supported, leading to the compiler inserting unnecessary extend/truncate operations when vectorizing code that used _Float16 rounding. By allowing direct support, the compiler can avoid these extra operations, improving vectorization efficiency.