rust/compiler/rustc_const_eval/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
..
const_eval Rollup merge of #107801 - davidtwco:stability-implies-const, r=Nilstrieb 2023-03-06 16:41:56 +01:00
interpret Auto merge of #108872 - cjgillot:simp-const-prop, r=oli-obk 2023-03-12 23:27:52 +00:00
transform Auto merge of #108282 - cjgillot:mir-checked-sh, r=tmiasko 2023-03-15 21:31:06 +00:00
util Allow checking whether a type allows being uninitialized 2023-03-02 18:33:48 +00:00
errors.rs errors: generate typed identifiers in each crate 2023-02-22 09:15:53 +00:00
lib.rs Simplify message paths 2023-03-11 22:51:57 +01:00