rust/compiler/rustc_middle/src
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
..
dep_graph Pass DepContext and QueryContext by value when practical 2023-02-14 17:21:18 +01:00
hir Remove some direct calls to local_def_id_to_hir_id on diagnostics 2023-03-14 11:38:12 -03:00
infer Auto merge of #108121 - aliemjay:resolve-var-region, r=lcnr 2023-03-08 12:33:21 +00:00
middle rustc_middle: Remove trait DefIdTree 2023-03-02 23:46:44 +04:00
mir Auto merge of #108282 - cjgillot:mir-checked-sh, r=tmiasko 2023-03-15 21:31:06 +00:00
query Rollup merge of #109109 - compiler-errors:polymorphize-foreign, r=Nilstrieb 2023-03-15 17:51:31 +05:30
thir Move THIR printing to rustc_mir_build. 2023-02-26 14:31:15 +00:00
traits Move some solver stuff to middle 2023-03-10 23:46:38 +00:00
ty Auto merge of #108282 - cjgillot:mir-checked-sh, r=tmiasko 2023-03-15 21:31:06 +00:00
util Add some docs to bug, span_bug and delay_span_bug 2022-12-30 16:47:56 +01:00
arena.rs Rollup merge of #108806 - cjgillot:query-lints, r=davidtwco 2023-03-11 15:43:15 +01:00
error.rs Match crate and slug names 2022-11-21 15:24:50 +01:00
lib.rs Simplify message paths 2023-03-11 22:51:57 +01:00
lint.rs create helper function for rustc_lint_defs::Level and remove it's duplicated code r=ozkanonur 2023-01-10 10:56:17 +03:00
macros.rs Remove type-traversal trait aliases 2023-02-22 17:04:58 +00:00
metadata.rs rustc: Parameterize ty::Visibility over used ID 2022-09-07 13:35:41 +04:00
tests.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
thir.rs Make ExprKind the first field in thir::Expr 2023-03-02 18:21:44 +00:00
values.rs rustc_middle: Remove trait DefIdTree 2023-03-02 23:46:44 +04:00