diff options
| author | bors <bors@rust-lang.org> | 2024-01-25 05:16:53 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-01-25 05:16:53 +0000 |
| commit | 50a067d7f84bdfac963669b69e9cd12b97d9a82f (patch) | |
| tree | b56f61de65a828dfd1ad115bfe6bbfbe5a789f55 /compiler/rustc_parse/src/parser/expr.rs | |
| parent | 0c83e434e155433890ab5f4c6436473e440aa586 (diff) | |
| parent | 55e04d5236b5e45ddaad11df6b6c41ad6ca03f76 (diff) | |
| download | rust-50a067d7f84bdfac963669b69e9cd12b97d9a82f.tar.gz rust-50a067d7f84bdfac963669b69e9cd12b97d9a82f.zip | |
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`
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
0 files changed, 0 insertions, 0 deletions
