Skip to content

Conversation

@folkertdev
Copy link
Contributor

For other targets we don't have such instances. We specifically decided against implementing arithmetic operators on these low-level vector types. The impl has been replaced by a vec_neg function.

Over on https://www.ibm.com/docs/en/zos/2.4.0?topic=functions-defining-vector-built-in-from-operators it is suggested to define vec_neg. We already implement the other defines on that page, so this seems like a logical extension.

On s390x vec_neg is also implemented for unsigned integer vector types https://godbolt.org/z/ddadsrn3q. vec_neg is not implemented for the bool types, see https://godbolt.org/z/TdKr7enhb).

On powerpc vec_neg is also implemented for the unsigned integer and bool vector types https://godbolt.org/z/faMbx45K3.

I plan to propose stabilization of the s390x vector types in the near future.

For other targets we don't have such instances. We specifically decided agains implementing arithmetic operators on these low-level vector types
@rustbot
Copy link
Collaborator

rustbot commented Jan 11, 2026

r? @sayantn

rustbot has assigned @sayantn.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@sayantn
Copy link
Contributor

sayantn commented Jan 17, 2026

LGTM, we shouldn't have such ops implementations only for some archs - that creates a non-uniformity in stdarch.

@sayantn sayantn added this pull request to the merge queue Jan 17, 2026
Merged via the queue into rust-lang:main with commit 832e654 Jan 17, 2026
75 checks passed
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.

3 participants