// To avoid UB from LLVM, these two functions mask RHS with an
// appropriate mask unconditionally (i.e. the fallback behavior for
// all shifts). For 32- and 64-bit types, this matches the semantics
// of Java. (See related discussion on #1877 and #10183.)
To avoid UB from LLVM, these two functions mask RHS with an
appropriate mask unconditionally . For 32- and 64-bit types, this matches the semantics
of Java.
To avoid UB from LLVM these two functions mask RHS with an appropriate mask unconditionally . For 32 - and 64 - bit types this matches the semantics of Java .
fn build_unchecked_lshift<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
                                      lhs: ValueRef,
                                      rhs: ValueRef,
                                      binop_debug_loc: DebugLoc) -> ValueRef {
    let rhs = base::cast_shift_expr_rhs(bcx, hir::BinOp_::BiShl, lhs, rhs);
    // #1877, #10183: Ensure that input is always valid
    let rhs = shift_mask_rhs(bcx, rhs, binop_debug_loc);
    Shl(bcx, lhs, rhs, binop_debug_loc)
}
fn build_unchecked_lshift < ' blk , ' tcx > ( bcx : Block < ' blk , ' tcx > , lhs : ValueRef , rhs : ValueRef , binop_debug_loc : DebugLoc ) -> ValueRef { let rhs = base :: cast_shift_expr_rhs ( bcx , hir :: BinOp_ :: BiShl , lhs , rhs ) ; // #1877, #10183: Ensure that input is always valid let rhs = shift_mask_rhs ( bcx , rhs , binop_debug_loc ) ; Shl ( bcx , lhs , rhs , binop_debug_loc ) }
To avoid UB from LLVM, these two functions mask RHS with an
appropriate mask unconditionally (i.e.
To avoid UB from LLVM these two functions mask RHS with an appropriate mask unconditionally ( i . e .
bcx
Block<'blk, 'tcx>
lhs
ValueRef
rhs
ValueRef
binop_debug_loc
DebugLoc