rust/compiler
bors c90eb4825a Auto merge of #108282 - cjgillot:mir-checked-sh, r=tmiasko
Implement checked Shl/Shr at MIR building.

This does not require any special handling by codegen backends,
as the overflow behaviour is entirely determined by the rhs (shift amount).

This allows MIR ConstProp to remove the overflow check for constant shifts.

~There is an existing different behaviour between cg_llvm and cg_clif (cc `@bjorn3).`
I took cg_llvm's one as reference: overflow if `rhs < 0 || rhs > number_of_bits_in_lhs_ty`.~

EDIT: `cg_llvm` and `cg_clif` implement the overflow check differently. This PR uses `cg_llvm`'s implementation based on a `BitAnd` instead of `cg_clif`'s one based on an unsigned comparison.
2023-03-15 21:31:06 +00:00
..
rustc fix link 2023-03-11 10:53:47 -06:00
rustc_abi Unify validity checks into a single query 2023-02-23 18:42:36 +00:00
rustc_apfloat compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_arena compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_ast Remove box_syntax from AST and use in tools 2023-03-12 13:19:46 +00:00
rustc_ast_lowering Auto merge of #104833 - Swatinem:async-identity-future, r=compiler-errors 2023-03-14 10:12:58 +00:00
rustc_ast_passes Auto merge of #108471 - clubby789:unbox-the-syntax, r=Nilstrieb,est31 2023-03-13 10:41:50 +00:00
rustc_ast_pretty Remove box_syntax from AST and use in tools 2023-03-12 13:19:46 +00:00
rustc_attr Simplify message paths 2023-03-11 22:51:57 +01:00
rustc_baked_icu_data update ICU4X to 1.1.0 2023-02-04 22:28:59 +01:00
rustc_borrowck Simplify message paths 2023-03-11 22:51:57 +01:00
rustc_builtin_macros Properly allow macro expanded format_args invocations to uses captures 2023-03-14 13:16:52 +00:00
rustc_codegen_cranelift Auto merge of #108282 - cjgillot:mir-checked-sh, r=tmiasko 2023-03-15 21:31:06 +00:00
rustc_codegen_gcc Remove uses of box_syntax in rustc and tools 2023-03-12 13:19:46 +00:00
rustc_codegen_llvm Rollup merge of #108726 - est31:backticks_matchmaking_tidy, r=Nilstrieb 2023-03-12 08:13:25 +01:00
rustc_codegen_ssa Auto merge of #108282 - cjgillot:mir-checked-sh, r=tmiasko 2023-03-15 21:31:06 +00:00
rustc_const_eval Auto merge of #108282 - cjgillot:mir-checked-sh, r=tmiasko 2023-03-15 21:31:06 +00:00
rustc_data_structures Rollup merge of #108887 - nnethercote:rename-MapInPlace, r=lqd 2023-03-08 21:24:53 +01:00
rustc_driver Remove unneeded extern crate 2023-02-02 07:47:39 +01:00
rustc_driver_impl Simplify message paths 2023-03-11 22:51:57 +01:00
rustc_error_codes Remove uses of box_syntax in rustc and tools 2023-03-12 13:19:46 +00:00
rustc_error_messages Simplify message paths 2023-03-11 22:51:57 +01:00
rustc_errors Simplify message paths 2023-03-11 22:51:57 +01:00
rustc_expand Simplify message paths 2023-03-11 22:51:57 +01:00
rustc_feature Remove box_syntax from AST and use in tools 2023-03-12 13:19:46 +00:00
rustc_fs_util Remove useless borrows and derefs 2022-12-01 17:34:43 +00:00
rustc_graphviz Fix uninlined_format_args for some compiler crates 2023-01-05 19:01:12 +01:00
rustc_hir Rollup merge of #108923 - spastorino:new-rpitit-9, r=compiler-errors 2023-03-14 17:40:05 +01:00
rustc_hir_analysis Auto merge of #109035 - scottmcm:ptr-read-should-know-undef, r=WaffleLapkin,JakobDegen 2023-03-15 11:44:12 +00:00
rustc_hir_pretty Remove uses of box_syntax in rustc and tools 2023-03-12 13:19:46 +00:00
rustc_hir_typeck Auto merge of #107376 - aliemjay:remove-givens, r=lcnr 2023-03-15 02:50:58 +00:00
rustc_incremental Auto merge of #108794 - nnethercote:avoid-unnecessary-hashing, r=cjgillot 2023-03-12 06:48:30 +00:00
rustc_index Match unmatched backticks in compiler/ that are part of rustdoc 2023-03-03 08:39:00 +01:00
rustc_infer Auto merge of #107376 - aliemjay:remove-givens, r=lcnr 2023-03-15 02:50:58 +00:00
rustc_interface metadata: Remove some more untracked CStore methods 2023-03-13 17:31:55 +04:00
rustc_lexer fix(lexer): not skipped whitespace warning for '\x0c' 2023-03-09 22:44:58 +08:00
rustc_lint Fix #109152, fix the scenario that we may can not get span of func 2023-03-15 14:07:39 +08:00
rustc_lint_defs Auto merge of #109035 - scottmcm:ptr-read-should-know-undef, r=WaffleLapkin,JakobDegen 2023-03-15 11:44:12 +00:00
rustc_llvm Remove an extraneous include 2023-03-07 22:46:39 -08:00
rustc_log Rollup merge of #107895 - matthiaskrgr:cl, r=compiler-errors 2023-02-11 17:18:44 +01:00
rustc_macros Allow using bool for optional diagnostics 2023-02-27 12:54:11 +00:00
rustc_metadata Rollup merge of #109109 - compiler-errors:polymorphize-foreign, r=Nilstrieb 2023-03-15 17:51:31 +05:30
rustc_middle Auto merge of #108282 - cjgillot:mir-checked-sh, r=tmiasko 2023-03-15 21:31:06 +00:00
rustc_mir_build Auto merge of #108282 - cjgillot:mir-checked-sh, r=tmiasko 2023-03-15 21:31:06 +00:00
rustc_mir_dataflow Simplify message paths 2023-03-11 22:51:57 +01:00
rustc_mir_transform Auto merge of #109035 - scottmcm:ptr-read-should-know-undef, r=WaffleLapkin,JakobDegen 2023-03-15 11:44:12 +00:00
rustc_monomorphize Rollup merge of #109109 - compiler-errors:polymorphize-foreign, r=Nilstrieb 2023-03-15 17:51:31 +05:30
rustc_parse Auto merge of #108471 - clubby789:unbox-the-syntax, r=Nilstrieb,est31 2023-03-13 10:41:50 +00:00
rustc_parse_format Improve heuristics for format_args literal being suggestable 2023-03-14 13:20:39 +00:00
rustc_passes Tighter spans 2023-03-14 19:12:42 +00:00
rustc_plugin_impl Simplify message paths 2023-03-11 22:51:57 +01:00
rustc_privacy Simplify message paths 2023-03-11 22:51:57 +01:00
rustc_query_impl Ensure value is on the on-disk cache before returning. 2023-03-11 22:41:01 +00:00
rustc_query_system Auto merge of #108845 - Zoxc:par-fix-2, r=cjgillot 2023-03-12 17:03:44 +00:00
rustc_resolve metadata/resolve: Minor refactoring to "tcx -> cstore" conversions 2023-03-13 17:31:55 +04:00
rustc_serialize Emit the enum discriminant separately for the Encodable macro 2023-02-25 01:04:56 +01:00
rustc_session Auto merge of #108794 - nnethercote:avoid-unnecessary-hashing, r=cjgillot 2023-03-12 06:48:30 +00:00
rustc_smir Change item collection to be on demand 2023-03-07 12:47:25 -08:00
rustc_span Auto merge of #109035 - scottmcm:ptr-read-should-know-undef, r=WaffleLapkin,JakobDegen 2023-03-15 11:44:12 +00:00
rustc_symbol_mangling Simplify message paths 2023-03-11 22:51:57 +01:00
rustc_target Rollup merge of #108722 - petrhosek:fuchsia-riscv, r=petrochenkov 2023-03-14 17:40:03 +01:00
rustc_trait_selection Auto merge of #107376 - aliemjay:remove-givens, r=lcnr 2023-03-15 02:50:58 +00:00
rustc_traits Add mk_canonical_var_infos_from_iter. 2023-02-24 07:33:02 +11:00
rustc_transmute rustc_middle: Remove trait DefIdTree 2023-03-02 23:46:44 +04:00
rustc_ty_utils Auto merge of #109089 - compiler-errors:opt_rpitit_info-follow-up, r=spastorino 2023-03-15 08:13:23 +00:00
rustc_type_ir Rollup merge of #109047 - tshepang:type, r=lcnr 2023-03-12 20:44:52 +01:00