Skip to content

Conversation

@fhahn
Copy link

@fhahn fhahn commented Oct 30, 2025

Currently Clang usually leaves padding bits uninitialized, which means they are undef at the moment.

When expanding stores of vector types to include padding, the padding lanes will be poison, hence the padding bits will be poison.

This interacts badly with coercion of arguments and return values, where 3 x float vectors will be loaded as i128 integer; poisoning the padding bits will make the whole value poison.

Not sure if there's a better way, but I think we have a number of places that currently rely on the padding being undef, not poison.

PR: llvm#164821

rdar://162655662

(cherry-picked from 5378584)

Currently Clang usually leaves padding bits uninitialized, which means
they are undef at the moment.

When expanding stores of vector types to include padding, the padding
lanes will be poison, hence the padding bits will be poison.

This interacts badly with coercion of arguments and return values, where
3 x float vectors will be loaded as i128 integer; poisoning the padding
bits will make the whole value poison.

Not sure if there's a better way, but I think we have a number of places
that currently rely on the padding being undef, not poison.

PR: llvm#164821

rdar://162655662

(cherry-picked from 5378584)
@fhahn
Copy link
Author

fhahn commented Oct 30, 2025

@swift-ci please test

@fhahn
Copy link
Author

fhahn commented Oct 30, 2025

@swift-ci please test llvm

@fhahn
Copy link
Author

fhahn commented Oct 30, 2025

@swift-ci please test macos

1 similar comment
@fhahn
Copy link
Author

fhahn commented Oct 31, 2025

@swift-ci please test macos

@fhahn fhahn merged commit bff1370 into swiftlang:stable/21.x Nov 1, 2025
5 checks passed
@fhahn fhahn deleted the fix-ext-vector-padding-poison branch November 1, 2025 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant