Commit Graph

259 Commits

Author SHA1 Message Date
bjorn3 e51a1665d9 Sync from rust a5c825cd82 2026-04-15 15:55:03 +02:00
Oli Scherer 4fe5deaac7 Use !null pattern type in libcore 2026-04-13 17:23:03 +02:00
bjorn3 2db57c7741 Sync from rust 48cc71ee88 2026-04-01 15:47:50 +02:00
Guillaume Gomez 496728e21f Rollup merge of #154043 - RalfJung:simd-min-max, r=Amanieu,calebzulawski,antoyo
simd_fmin/fmax: make semantics and name consistent with scalar intrinsics

This is the SIMD version of https://github.com/rust-lang/rust/pull/153343: change the documented semantics of the SIMD float min/max intrinsics to that of the scalar intrinsics, and also make the name consistent. The overall semantic change this amounts to is that we restrict the non-determinism: the old semantics effectively mean "when one input is an SNaN, the result non-deterministically is a NaN or the other input"; the new semantics say that in this case the other input must be returned. For all other cases, old and new semantics are equivalent. This means all users of these intrinsics that were correct with the old semantics are still correct: the overall set of possible behaviors has become smaller, no new possible behaviors are being added.

In terms of providers of this API:
- Miri, GCC, and cranelift already implement the new semantics, so no changes are needed.
- LLVM is adjusted to use `minimumnum nsz` instead of `minnum`, thus giving us the new semantics.

In terms of consumers of this API:
- Portable SIMD almost certainly wants to match the scalar behavior, so this is strictly a bugfix here.
- Stdarch mostly stopped using the intrinsic, except on nvptx, where arguably the new semantics are closer to what we actually want than the old semantics (https://github.com/rust-lang/stdarch/issues/2056).

Q: Should there be an `f` in the intrinsic name to indicate that it is for floats? E.g., `simd_fminimum_number_nsz`?

Also see https://github.com/rust-lang/rust/issues/153395.
2026-03-29 00:06:50 +01:00
bjorn3 6aa386cfc6 Merge branch 'sync_from_rust' 2026-03-25 11:51:29 +01:00
bjorn3 9a925322ac Merge commit '493d427c7d3423f085f05179e36a35b4943b1379' into sync_cg_clif-2026-03-25 2026-03-25 11:43:04 +01:00
bjorn3 910d0d7a77 Fix calling custom call conv functions from inline asm 2026-03-20 13:36:26 +01:00
Ralf Jung a3741b2aef simd_fmin/fmax: make semantics and name consistent with scalar intrinsics 2026-03-18 15:17:56 +01:00
bjorn3 8fc7440cec Fix 2026-03-10 16:04:12 +00:00
bjorn3 c465c7571a Another unused feature fix 2026-03-06 22:26:22 +00:00
bjorn3 2d2c5521a2 Fix another unused feature warning 2026-03-06 15:07:59 +00:00
bjorn3 e316da9660 Fix unused feature warning 2026-03-06 14:16:48 +00:00
Cathal Mullan 8c93b88076 Extend x86 inline asm to support ymm and zmm vector registers 2026-02-28 23:15:22 +00:00
bjorn3 cef9cfee90 Sync from rust 3c9faa0d03 2026-02-17 10:47:17 +00:00
Ralf Jung db5ed68a88 add write_box_via_move intrinsic and use it for vec!
This allows us to get rid of box_new entirely
2026-02-16 17:27:40 +01:00
bjorn3 94d5977b6c Sync from rust 2850ca8295 2026-01-14 10:53:34 +00:00
Martin Nordholts 0cba97b3b4 Finish transition from semitransparent to semiopaque for rustc_macro_transparency 2026-01-08 19:14:45 +01:00
bjorn3 45671b42e6 Merge commit '8de4afd39ba48f25be98684cdb7a96ec6da89d10' into sync_cg_clif-2025-12-18 2025-12-18 11:50:08 +00:00
Opstic 4748c53720 Add llvm.x86.vcvtps2ph.128 (#1613)
* Add `llvm.x86.vcvtps2ph.128`

* `cargo fmt`

* Test `_mm_cvtps_ph`
2025-12-14 11:53:13 +01:00
bjorn3 c90a9d836b Merge commit 'a0b865dc8782500efe9623859017dd5e16f85407' into sync_cg_clif-2025-11-08 2025-11-08 14:18:53 +00:00
bjorn3 022bb60b8e Rustup to rustc 1.93.0-nightly (adaa83897 2025-10-27) 2025-10-28 15:17:46 +00:00
bjorn3 6f1899c373 Sync from rust adaa838976 2025-10-28 15:11:14 +00:00
Camille Gillot cc27b04473 Replace NullOp::SizeOf and NullOp::AlignOf by lang items. 2025-10-23 00:38:28 +00:00
bjorn3 c0a733f096 Sync from rust a7a1618e6c 2025-07-23 14:34:28 +00:00
Scott McMurray 7fa842965e Update cranelift tests 2025-07-20 10:15:14 -07:00
bjorn3 d117c77a0e Fix raw-dylib.rs 2025-07-04 09:55:39 +00:00
bjorn3 cdf5236ee8 Fix neon.rs 2025-07-04 09:55:07 +00:00
bjorn3 f02793c37f Fix std_example on x86 2025-07-04 09:47:01 +00:00
bjorn3 d24852f515 Migrate all tests to the 2024 edition 2025-07-04 09:18:44 +00:00
bjorn3 c2d7ac4717 Revert enabling rustc_private for mini_core_hello_world 2025-07-01 08:22:44 +00:00
Oli Scherer 95281ed1c1 Stop backends from needing to support nullary intrinsics 2025-06-30 08:04:19 +00:00
David Wood cfa4c8f473 cranelift/gcc: {Meta,Pointee,}Sized in minicore
As in many previous commits, adding the new traits to minicore, but this
time for cranelift and gcc.
2025-06-16 23:04:37 +00:00
Matthias Krüger 8b24077171 Rollup merge of #141811 - mejrs:bye_locals, r=compiler-errors
Unimplement unsized_locals

Implements https://github.com/rust-lang/compiler-team/issues/630

Tracking issue here: https://github.com/rust-lang/rust/issues/111942

Note that this just removes the feature, not the implementation, and does not touch `unsized_fn_params`. This is because it is required to support `Box<dyn FnOnce()>: FnOnce()`.

There may be more that should be removed (possibly in follow up prs)
- the `forget_unsized` function and `forget` intrinsic.
- the `unsized_locals` test directory; I've just fixed up the tests for now
- various codegen support for unsized values and allocas

cc ``@JakobDegen`` ``@oli-obk`` ``@Noratrieb`` ``@programmerjake`` ``@bjorn3``

``@rustbot`` label F-unsized_locals

Fixes rust-lang/rust#79409
2025-06-14 11:27:10 +02:00
mejrs a6ecde32b9 Unimplement unsized_locals 2025-06-13 01:16:36 +02:00
Ralf Jung a9fd42e536 intrinsics: rename min_align_of to align_of 2025-06-12 17:50:25 +02:00
sayantn b97136c817 Add impl for llvm.roundeven in cg_clif
- remove unused `llvm.aarch64.neon.frintn` from cg_clif
2025-06-03 20:37:10 +05:30
bjorn3 4f24d142d9 Merge commit '979dcf8e2f213e4f4b645cb62e7fe9f4f2c0c785' into sync_cg_clif-2025-05-25 2025-05-25 18:51:16 +00:00
bendn 00417de6b8 Suggest {to,from}_ne_bytes for transmutations between arrays and integers, etc 2025-04-24 13:14:36 +07:00
bors d9dac3cb38 Auto merge of #139309 - RalfJung:abi_unsupported_vector_types, r=fee1-dead,traviscross
make abi_unsupported_vector_types a hard error

Fixes https://github.com/rust-lang/rust/issues/116558 by completing the transition; see that issue for context. The lint was introduced with Rust 1.84 and this has been shown in cargo's future breakage reports since Rust 1.85, released 6 weeks ago, and so far we got 0 complaints by users. There's not even a backlink on the tracking issue. We did a [crater run](https://github.com/rust-lang/rust/pull/127731#issuecomment-2286736295) when the lint was originally added and found no breakage. So I don't think we need another crater run now, but I can do one if the team prefers that.

https://github.com/rust-lang/rust/issues/131800 is done, so for most current targets (in particular, all tier 1 and tier 2 targets) we have the information to implement this check (modulo the targets where we don't properly support SIMD vectors yet, see the sub-issues of https://github.com/rust-lang/rust/issues/116558). If a new target gets added in the future, it will default to reject all SIMD vector types until proper information is added, which is the default we want.

This will need approval by for `@rust-lang/lang.` Cc `@workingjubilee` `@veluca93`

try-job: test-various
try-job: armhf-gnu
try-job: dist-i586-gnu-i586-i686-musl
2025-04-24 00:44:40 +00:00
Ralf Jung d50c76974f make abi_unsupported_vector_types a hard error 2025-04-20 11:34:56 +02:00
Folkert de Vries 88ddf9e203 stabilize naked_functions 2025-04-20 11:18:38 +02:00
Folkert de Vries 59c5ed0ba8 Make #[naked] an unsafe attribute 2025-04-19 00:03:35 +02:00
bjorn3 625b8000f7 Allow formatting example/gen_block_iterate.rs 2025-04-01 14:49:15 +00:00
Ralf Jung 56715d9864 intrinsics: remove unnecessary leading underscore from argument names 2025-03-12 08:04:09 +01:00
Oli Scherer d9de94001a Implement #[define_opaque] attribute for functions. 2025-03-11 12:05:02 +00:00
Ralf Jung 957389c196 remove support for rustc_intrinsic_must_be_overridden from the compiler 2025-02-24 07:53:59 +01:00
Michael Goulet c6ddd335a8 Implement and use BikeshedGuaranteedNoDrop for union/unsafe field validity 2025-02-13 03:45:04 +00:00
bjorn3 6bd92ef9cb Rustfmt 2025-02-08 22:12:13 +00:00
bjorn3 04e580fcc5 Merge commit '8332329f83d4ef34479fec67cc21b21246dca6b5' into sync_cg_clif-2025-02-07 2025-02-07 20:58:27 +00:00
bjorn3 2c2d2a7e0d Merge commit 'e39eacd2d415803ef82de3b6a314e4f2d0fbc4dc' into sync_cg_clif-2025-01-10 2025-01-10 09:02:07 +00:00