Skip to content

Commit

Permalink
Merge pull request #1476 from taiki-e/unchecked-shift
Browse files Browse the repository at this point in the history
Fix ICE on unchecked shift
  • Loading branch information
bjorn3 authored Apr 3, 2024
2 parents d9f29fa + 4e4de3f commit 64d6da5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/num.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ pub(crate) fn codegen_int_binop<'tcx>(
in_lhs: CValue<'tcx>,
in_rhs: CValue<'tcx>,
) -> CValue<'tcx> {
if bin_op != BinOp::Shl && bin_op != BinOp::Shr {
if !matches!(bin_op, BinOp::Shl | BinOp::ShlUnchecked | BinOp::Shr | BinOp::ShrUnchecked) {
assert_eq!(
in_lhs.layout().ty,
in_rhs.layout().ty,
Expand Down

0 comments on commit 64d6da5

Please sign in to comment.