use casted_rhs instead of rhs so icmp works correctly for airShlSat

This commit is contained in:
Stefan Su
2023-12-22 09:51:41 -05:00
committed by GitHub
parent fd98fc1c5f
commit 42ddf592dd
2 changed files with 44 additions and 1 deletions

View File

@@ -8433,7 +8433,7 @@ pub const FuncGen = struct {
llvm_lhs_ty,
try o.builder.intConst(llvm_lhs_scalar_ty, -1),
);
const in_range = try self.wip.icmp(.ult, rhs, bits, "");
const in_range = try self.wip.icmp(.ult, casted_rhs, bits, "");
return self.wip.select(.normal, in_range, result, lhs_max, "");
}