Commit Graph

4200 Commits

Author SHA1 Message Date
Gary Guo
98dcd85054 Change InlineAsm to allow multiple targets instead 2024-02-24 18:50:09 +00:00
bjorn3
e9e6b7cd0d
Merge pull request #1459 from uweigand/update-libc
Update libc dependency to 0.2.153
2024-02-23 18:12:41 +01:00
Ulrich Weigand
26ee4c93b5 Update libc dependency to 0.2.153 2024-02-23 17:33:46 +01:00
Ralf Jung
ac8c8b612d remove simd_reduce_{min,max}_nanless 2024-02-21 20:50:47 +01:00
bors
709c00a047 Auto merge of #120718 - saethlin:reasonable-fast-math, r=nnethercote
Add "algebraic" fast-math intrinsics, based on fast-math ops that cannot return poison

Setting all of LLVM's fast-math flags makes our fast-math intrinsics very dangerous, because some inputs are UB. This set of flags permits common algebraic transformations, but according to the [LangRef](https://llvm.org/docs/LangRef.html#fastmath), only the flags `nnan` (no nans) and `ninf` (no infs) can produce poison.

And this uses the algebraic float ops to fix https://github.com/rust-lang/rust/issues/120720

cc `@orlp`
2024-02-21 09:43:33 +00:00
bjorn3
8fb0fbef62 Fix rustc test suite 2024-02-20 21:57:28 +00:00
bjorn3
d23026ac1b Update to Cranelift 0.105 2024-02-20 20:52:27 +00:00
bjorn3
b03b41420b Fix stack alignment problem on s390x 2024-02-20 17:45:28 +00:00
bjorn3
c7a50c2636 Adapt filtering of rustc tests for upstream changes 2024-02-20 17:44:00 +00:00
Ben Kimock
968e79540d Add "algebraic" versions of the fast-math intrinsics 2024-02-20 12:39:03 -05:00
bjorn3
49db50eaa5 Rustup to rustc 1.78.0-nightly (3246e7951 2024-02-19) 2024-02-20 16:59:44 +00:00
bjorn3
e1841fbee0 Sync from rust 3246e79513 2024-02-20 15:52:04 +00:00
bjorn3
ba7404a293
Merge pull request #1457 from uweigand/simd-endian
Fix simd_select_bitmask on big-endian systems
2024-02-19 14:38:00 +01:00
bjorn3
2768789b20
Merge pull request #1458 from uweigand/hash-endian
Fix download hash check on big-endian systems
2024-02-19 14:37:43 +01:00
Ulrich Weigand
bc1bca798f Fix download hash check on big-endian systems
Ensure the hash_file and hash_dir routines give identical results
on big- and little-endian systems.  The default hash routines for
integer types are endian-dependent, so all such hash inputs need
to be byte-swapped.

This applies in particular to the file hashes used as input when
computing directory hashes.

In addition, the default hash routines for composite types use
a length prefix, which it itself an integer type (usize).  In
order to be able to byte-swap that prefix, we have to re-implement
those bits of the standard library ourselves.
2024-02-19 14:08:49 +01:00
Ulrich Weigand
b886be124d Fix simd_select_bitmask on big-endian systems
The mask input for simd_select_bitmask depends on the host byteorder
in the same way as the mask output of simd_bitmask does.  Fix the
implementation to work on both big- and little-endian systems.
2024-02-19 12:33:08 +01:00
bors
4f23c244e9 Auto merge of #121034 - obeis:improve-static-mut-ref, r=RalfJung
Improve wording of `static_mut_ref`

Close #120964
2024-02-18 08:00:34 +00:00
Obei Sideg
8ce7f62e58 Improve wording of static_mut_ref
Rename `static_mut_ref` lint to `static_mut_refs`.
2024-02-18 06:01:40 +03:00
Matthias Krüger
f7143af56c Rollup merge of #121209 - nnethercote:infallible-join_codegen, r=bjorn3
Make `CodegenBackend::join_codegen` infallible.

Because they all are, in practice.

r? ```@bjorn3```
2024-02-17 18:47:42 +01:00
Nicholas Nethercote
0fd329b96a Make CodegenBackend::join_codegen infallible.
Because they all are, in practice.
2024-02-17 10:51:35 +11:00
bjorn3
e4584e84d9 Re-enable fixed rustc tests 2024-02-15 11:51:43 +00:00
bjorn3
3918b4783d Workaround UB in cranelift-jit 2024-02-15 10:23:58 +00:00
bjorn3
35b431884f Disable test broken due to upstream bug 2024-02-15 10:21:06 +00:00
Oli Scherer
aa6d02f368 Give const_deallocate a default body 2024-02-12 17:52:05 +00:00
Oli Scherer
bd14c7b8e5 Teach llvm backend how to fall back to default bodies 2024-02-12 17:50:39 +00:00
Oli Scherer
a51b61a8b6 Add intrinsic body fallback to cranelift and use it 2024-02-12 17:44:55 +00:00
bjorn3
3669dba8e8 Rustup to rustc 1.78.0-nightly (1a648b397 2024-02-11) 2024-02-12 16:58:51 +00:00
bjorn3
c98301d3b2 Sync from rust 1a648b397d 2024-02-12 15:49:31 +00:00
bors
f90a0b9a18 Auto merge of #120843 - matthiaskrgr:rollup-med37z5, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #113671 (Make privacy visitor use types more (instead of HIR))
 - #120308 (core/time: avoid divisions in Duration::new)
 - #120693 (Invert diagnostic lints.)
 - #120704 (A drive-by rewrite of `give_region_a_name()`)
 - #120809 (Use `transmute_unchecked` in `NonZero::new`.)
 - #120817 (Fix more `ty::Error` ICEs in MIR passes)
 - #120828 (Fix `ErrorGuaranteed` unsoundness with stash/steal.)
 - #120831 (Startup objects disappearing from sysroot)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-02-09 15:34:48 +00:00
Matthias Krüger
55b32315be Rollup merge of #120693 - nnethercote:invert-diagnostic-lints, r=davidtwco
Invert diagnostic lints.

That is, change `diagnostic_outside_of_impl` and `untranslatable_diagnostic` from `allow` to `deny`, because more than half of the compiler has been converted to use translated diagnostics.

This commit removes more `deny` attributes than it adds `allow` attributes, which proves that this change is warranted.

r? ````@davidtwco````
2024-02-09 14:41:50 +01:00
Ben Kimock
caa23f103c Add a new debug_assertions instrinsic (compiler)
And in clippy
2024-02-08 11:49:08 -05:00
Nicholas Nethercote
515ee70efa Invert diagnostic lints.
That is, change `diagnostic_outside_of_impl` and
`untranslatable_diagnostic` from `allow` to `deny`, because more than
half of the compiler has be converted to use translated diagnostics.

This commit removes more `deny` attributes than it adds `allow`
attributes, which proves that this change is warranted.
2024-02-06 13:12:33 +11:00
bors
d631662a56 Auto merge of #117372 - Amanieu:stdarch_update, r=Mark-Simulacrum
Update stdarch submodule

Splits up #27731 into multiple tracking issues.

Closes #27731
2024-02-05 15:41:40 +00:00
bjorn3
cdae185e30 Implement SHA-1 x86 vendor intrinsics 2024-02-01 10:29:51 +00:00
clubby789
b2ff1231dd Remove the abi_amdgpu_kernel feature 2024-01-30 15:46:40 +00:00
Amanieu d'Antras
be4d3fb261 Update ahash dependency to 0.8.7 2024-01-30 03:34:28 +00:00
bjorn3
82d08913d8 Rustup to rustc 1.77.0-nightly (e7bbe8ce9 2024-01-26) 2024-01-27 10:53:32 +00:00
bjorn3
c71356c462 Sync from rust e7bbe8ce93 2024-01-27 10:39:20 +00:00
bjorn3
0061bb7faf Merge commit '3e50cf65025f96854d6597e80449b0d64ad89589' into sync_cg_clif-2024-01-26 2024-01-26 18:33:45 +00:00
bjorn3
3e50cf6502 Rustup to rustc 1.77.0-nightly (5bd5d214e 2024-01-25) 2024-01-26 18:24:04 +00:00
bjorn3
dff600d1d3 Sync from rust 5bd5d214ef 2024-01-26 18:11:31 +00:00
bjorn3
f78617994a Update rand test
This contains a fix for a recently introduced warning.
2024-01-26 18:08:00 +00:00
bjorn3
604c8a7cf8 Accept [u8; N] bitmasks in simd_select_bitmask
Fixes rust-lang/rustc_codegen_cranelift#1446
2024-01-26 14:19:11 +00:00
bjorn3
dc7ed1680c Update to Cranelift 0.104 2024-01-26 11:18:14 +00:00
bjorn3
1fba58ed94 Update actions/checkout and actions/cache 2024-01-26 11:06:55 +00:00
David Tolnay
b192f911d5 Rebase slice_group_by stabilization PR 2024-01-25 22:20:59 -08:00
bors
e8d600fd23 Auto merge of #116167 - RalfJung:structural-eq, r=lcnr
remove StructuralEq trait

The documentation given for the trait is outdated: *all* function pointers implement `PartialEq` and `Eq` these days. So the `StructuralEq` trait doesn't really seem to have any reason to exist any more.

One side-effect of this PR is that we allow matching on some consts that do not implement `Eq`. However, we already allowed matching on floats and consts containing floats, so this is not new, it is just allowed in more cases now. IMO it makes no sense at all to allow float matching but also sometimes require an `Eq` instance. If we want to require `Eq` we should adjust https://github.com/rust-lang/rust/pull/115893 to check for `Eq`, and rule out float matching for good.

Fixes https://github.com/rust-lang/rust/issues/115881
2024-01-26 00:17:00 +00:00
bjorn3
7d3b29399d Use sess.cfg_version instead of rustc_version_str()
This makes it easier to patch cg_clif to be statically linked as part of
rustc.
2024-01-25 21:21:27 +00:00
bors
50a067d7f8 Auto merge of #119911 - NCGThompson:is-statically-known, r=oli-obk
Replacement of #114390: Add new intrinsic `is_var_statically_known` and optimize pow for powers of two

This adds a new intrinsic `is_val_statically_known` that lowers to [``@llvm.is.constant.*`](https://llvm.org/docs/LangRef.html#llvm-is-constant-intrinsic).` It also applies the intrinsic in the int_pow methods to recognize and optimize the idiom `2isize.pow(x)`. See #114390 for more discussion.

While I have extended the scope of the power of two optimization from #114390, I haven't added any new uses for the intrinsic. That can be done in later pull requests.

Note: When testing or using the library, be sure to use `--stage 1` or higher. Otherwise, the intrinsic will be a noop and the doctests will be skipped. If you are trying out edits, you may be interested in [`--keep-stage 0`](https://rustc-dev-guide.rust-lang.org/building/suggested.html#faster-builds-with---keep-stage).

Fixes #47234
Resolves #114390
`@Centri3`
2024-01-25 05:16:53 +00:00
Ralf Jung
adbc67664b remove StructuralEq trait 2024-01-24 07:56:23 +01:00