Landing: ae4efe523b80

Project / Subsystem

gcc / i386

Date

2026-05-19

Author

oltolm

Commit

ae4efe523b80321fd885412fbc98e2102abc6178

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
i386
patch_id
commit_hash
ae4efe523b80321fd885412fbc98e2102abc6178
source_type
github
headline
i386: Return wider vectors in registers for x86_64 MS ABI.
tldr
Enables returning 256-bit and 512-bit vectors in registers for x86_64 MS ABI, improving code generation for AVX/AVX512.
author
oltolm
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • i386
  • x86_64
  • ABI
  • AVX
  • AVX512
discussion_id_link
bugzilla_pr
date
2026-05-19T00:00:00.000Z

This patch modifies GCC to return 256-bit and 512-bit vectors in registers (YMM0/ZMM0) when compiling for x86_64 Windows targets using the MS ABI. Previously, these vector returns were incorrectly classified as memory returns, leading to inefficient code generation with hidden sret pointer returns. This change improves code generation when AVX/AVX512 is enabled, ensuring that vector return values are passed in registers as expected.