rust/library
bors 039d887928 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
..
alloc Auto merge of #119433 - taiki-e:rc-uninit-ref, r=Nilstrieb 2024-01-23 16:43:45 +00:00
backtrace@6145fe6bac Update backtrace submodule 2023-11-21 16:33:42 +01:00
core Auto merge of #119911 - NCGThompson:is-statically-known, r=oli-obk 2024-01-25 05:16:53 +00:00
panic_abort rustc: implement support for `riscv32im_risc0_zkvm_elf` 2024-01-22 10:07:36 -08:00
panic_unwind Update test for `E0796` and `static_mut_ref` lint 2024-01-07 17:29:25 +03:00
portable-simd Fix target_feature config in portable-simd 2023-12-14 14:50:32 +01:00
proc_macro Document `Token{Stream,Tree}::Display` more thoroughly. 2024-01-22 13:31:52 +11:00
profiler_builtins Bump cfg(bootstrap) 2023-08-23 20:05:14 -04:00
rtstartup library: Fix warnings in rtstartup 2024-01-06 01:32:03 +03:00
rustc-std-workspace-alloc
rustc-std-workspace-core
rustc-std-workspace-std
std Rollup merge of #119616 - rylev:wasm32-wasi-preview2, r=petrochenkov,m-ou-se 2024-01-24 15:43:12 +01:00
stdarch@f4528dd6e8 Bump stdarch submodule 2023-10-12 11:11:29 +02:00
sysroot Expose `compiler-builtins-weak-intrinsics` feature for `-Zbuild-std` 2023-06-23 11:15:34 +01:00
test rustc: implement support for `riscv32im_risc0_zkvm_elf` 2024-01-22 10:07:36 -08:00
unwind Enable Static Builds for FreeBSD 2024-01-11 15:26:16 +00:00