Rollup merge of #125148 - RalfJung:codegen-sh, r=scottmcm

codegen: tweak/extend shift comments

r? `@scottmcm`
This commit is contained in:
Guillaume Gomez
2024-05-27 13:10:34 +02:00
committed by GitHub
2 changed files with 13 additions and 4 deletions

View File

@@ -110,8 +110,16 @@ pub trait BuilderMethods<'a, 'tcx>:
fn frem(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
fn frem_fast(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
fn frem_algebraic(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
/// Generate a left-shift. Both operands must have the same size. The right operand must be
/// interpreted as unsigned and can be assumed to be less than the size of the left operand.
fn shl(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
/// Generate a logical right-shift. Both operands must have the same size. The right operand
/// must be interpreted as unsigned and can be assumed to be less than the size of the left
/// operand.
fn lshr(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
/// Generate an arithmetic right-shift. Both operands must have the same size. The right operand
/// must be interpreted as unsigned and can be assumed to be less than the size of the left
/// operand.
fn ashr(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
fn unchecked_sadd(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
fn unchecked_uadd(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;