rust/compiler/rustc_codegen_gcc/src
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
..
back Rename many DiagCtxt arguments. 2023-12-18 16:06:22 +11:00
intrinsic Further Implement is_val_statically_known 2024-01-23 12:02:31 -05:00
abi.rs Merge commit 'e4fe941b11' into subtree-update_cg_gcc_2023-10-25 2023-10-26 17:42:02 -04:00
allocator.rs Add unstable -Zdefault-hidden-visibility cmdline flag for rustc. 2023-12-13 21:14:23 +00:00
archive.rs Rewrite LLVM's archive writer in Rust 2022-11-26 19:35:32 +00:00
asm.rs Support reg_addr register class in s390x inline assembly 2024-01-03 18:00:37 +09:00
attributes.rs Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
base.rs Pass TyCtxt by value 2023-11-19 14:04:40 -05:00
builder.rs Change rustc_codegen_ssa's atomic_cmpxchg interface to return a pair of values 2023-12-28 09:40:47 +00:00
callee.rs treat host effect params as erased generics in codegen 2023-09-14 07:34:35 +00:00
common.rs Remove dead codes 2023-12-11 23:24:32 +08:00
consts.rs Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
context.rs Further Implement is_val_statically_known 2024-01-23 12:02:31 -05:00
coverageinfo.rs Remove trait CoverageInfoMethods, since non-LLVM backends don't need it 2023-07-05 20:40:40 +10:00
debuginfo.rs Deduplicate inlined function debug info, but create a new lexical scope to child subsequent scopes and variables from colliding 2023-09-01 14:27:21 -07:00
declare.rs Merge commit 'e4fe941b11' into subtree-update_cg_gcc_2023-10-25 2023-10-26 17:42:02 -04:00
errors.rs Rename some Diagnostic setters. 2024-01-03 19:40:20 +11:00
gcc_util.rs Rename {create,emit}_warning as {create,emit}_warn. 2024-01-10 07:33:06 +11:00
int.rs Merge commit '2e8386e9fb' into subtree-update_cg_gcc_2023-11-17 2023-11-19 13:42:13 -05:00
lib.rs Rename {create,emit}_warning as {create,emit}_warn. 2024-01-10 07:33:06 +11:00
mono_item.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
type_.rs Merge commit 'e4fe941b11' into subtree-update_cg_gcc_2023-10-25 2023-10-26 17:42:02 -04:00
type_of.rs Remove movability from TyKind::Coroutine 2023-12-28 16:35:01 +00:00