diff options
| author | Catherine Flores <catherine.3.flores@gmail.com> | 2023-08-01 15:35:12 +0000 |
|---|---|---|
| committer | Nicholas Thompson <NCGThompson@gmail.com> | 2024-01-19 13:46:27 -0500 |
| commit | 5a4561749a18fa96691f9cf79699e6ab2f1f7b2c (patch) | |
| tree | 108d8b27aab1d3348a0c84e2dab8ab50b15fde7f /compiler/rustc_hir_analysis | |
| parent | 94807670a6a3834cc9b71b0b803d49d307c9ba5d (diff) | |
| download | rust-5a4561749a18fa96691f9cf79699e6ab2f1f7b2c.tar.gz rust-5a4561749a18fa96691f9cf79699e6ab2f1f7b2c.zip | |
Add new intrinsic `is_constant` and optimize `pow`
Fix overflow check Make MIRI choose the path randomly and rename the intrinsic Add back test Add miri test and make it operate on `ptr` Define `llvm.is.constant` for primitives Update MIRI comment and fix test in stage2 Add const eval test Clarify that both branches must have the same side effects guaranteed non guarantee use immediate type instead Co-Authored-By: Ralf Jung <post@ralfj.de>
Diffstat (limited to 'compiler/rustc_hir_analysis')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/check/intrinsic.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/intrinsic.rs b/compiler/rustc_hir_analysis/src/check/intrinsic.rs index a5aedeb33ae..40958f7a6e3 100644 --- a/compiler/rustc_hir_analysis/src/check/intrinsic.rs +++ b/compiler/rustc_hir_analysis/src/check/intrinsic.rs @@ -453,6 +453,8 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) { sym::black_box => (1, vec![param(0)], param(0)), + sym::is_val_statically_known => (1, vec![param(0)], tcx.types.bool), + sym::const_eval_select => (4, vec![param(0), param(1), param(2)], param(3)), sym::vtable_size | sym::vtable_align => { |
