50a067d7f8
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` |
||
---|---|---|
.. | ||
abi | ||
debuginfo | ||
driver | ||
intrinsics | ||
optimize | ||
allocator.rs | ||
analyze.rs | ||
archive.rs | ||
base.rs | ||
cast.rs | ||
codegen_i128.rs | ||
common.rs | ||
compiler_builtins.rs | ||
concurrency_limiter.rs | ||
config.rs | ||
constant.rs | ||
discriminant.rs | ||
global_asm.rs | ||
inline_asm.rs | ||
lib.rs | ||
linkage.rs | ||
main_shim.rs | ||
num.rs | ||
pointer.rs | ||
pretty_clif.rs | ||
toolchain.rs | ||
trap.rs | ||
unsize.rs | ||
value_and_place.rs | ||
vtable.rs |