Landing: bab20a370641

Project / Subsystem

gcc / gcc/vectorization

Date

2026-04-28

Author

Richard Biener

Commit

bab20a370641484fffa5ac5bb30b7d19f5d3fe92

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gcc/vectorization
patch_id
commit_hash
bab20a370641484fffa5ac5bb30b7d19f5d3fe92
source_type
github
headline
Improve x86 epilogue loop selection with cost comparison.
tldr
The compiler now prefers existing epilogues unless a new candidate offers optimal vectorization, resolving a test failure.
author
Richard Biener
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • gcc
  • vectorization
  • x86
  • optimization
discussion_id_link
bugzilla_pr
date
2026-04-28T00:00:00.000Z

This commit resolves a failure in gcc.target/i386/vect-epilogues-3.c when --param ix86-vect-compare-costs=1 is specified. The change modifies the better_epilogue_loop_than_p function to favor the existing epilogue when the target requests multiple epilogues, unless the new candidate uses a vectorization factor of one. This prevents regressions in gcc.dg/vect/costmodel/x86_64/costmodel-pr122573.c.