[PATCH] x86: support -Ofast
Project / Subsystem
binutils / x86
Date
2026-08-28
Proposer
Jan Beulich <jbeulich@suse.com>
Source type
public_inbox
Consensus
Under Review
Sentiment
6/10
Technical tradeoffs
- • Enables aggressive optimizations that may break strict floating-point compliance.
- • Allows for potential code size reduction or performance improvements through instruction encoding changes.
All attributes
- project
- binutils
- subsystem
- x86
- patch_id
- —
- discussion_id
- 7d179589-0048-4308-ba04-e259b646c022@suse.com
- source_type
- public_inbox
- title
- [PATCH] x86: support -Ofast
- headline
- x86 assembler: support -Ofast optimization flag
- tldr
- Adds support for the -Ofast optimization flag in the x86 assembler, analogous to GCC's option, allowing potentially unsafe floating-point optimizations.
- proposer
- Jan Beulich <jbeulich@suse.com>
- consensus
- Under Review
- outcome
- under_review
- sentiment_score
- 6
- technical_tradeoffs
-
- • Enables aggressive optimizations that may break strict floating-point compliance.
- • Allows for potential code size reduction or performance improvements through instruction encoding changes.
- series_id
- —
- series_role
- reply
- series_parts
- []
- tags
-
- • x86
- • assembler
- • optimization
- • floating-point
- • AVX
- bugzilla_url
- —
- date
- 2026-08-28T00:00:00.000Z
[PATCH] x86: support -Ofast
Jan Beulich proposes adding support for the -Ofast optimization flag to the x86 assembler. This flag, similar to GCC’s -Ofast, signals that the programmer accepts potentially incorrect floating-point behavior, such as the lack of strict NaN handling, to enable optimizations like VEX3->VEX2 encoding for certain AVX instructions. The change introduces a fast_math flag in tc-i386.c and updates the assembler’s documentation to reflect this new option.