authorgravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2020-12-09 16:58:13+01:00
committergravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2020-12-09 17:01:18+01:00
log2f4f7ace7a03098ca2f7c8f8d07bfbe8c2deb93d
tree4cda84efe91382daa2907507375471147795fa65
parent6f220bb7caefbd83493b769addb0a83f8252e132

stage1: Resolve some constants to u32, not usize

The latter may be smaller than a u32, use a u32 explicitly.

1 files changed, 1 insertions(+), 1 deletions(-)

src/stage1/ir.cpp+1-1
...@@ -26901,7 +26901,7 @@ static IrInstGen *ir_analyze_instruction_set_eval_branch_quota(IrAnalyze *ira,...@@ -26901,7 +26901,7 @@ static IrInstGen *ir_analyze_instruction_set_eval_branch_quota(IrAnalyze *ira,
26901 IrInstSrcSetEvalBranchQuota *instruction)26901 IrInstSrcSetEvalBranchQuota *instruction)
26902{26902{
26903 uint64_t new_quota;26903 uint64_t new_quota;
26904 if (!ir_resolve_usize(ira, instruction->new_quota->child, &new_quota))26904 if (!ir_resolve_unsigned(ira, instruction->new_quota->child, ira->codegen->builtin_types.entry_u32, &new_quota))
26905 return ira->codegen->invalid_inst_gen;26905 return ira->codegen->invalid_inst_gen;
2690626906
26907 if (new_quota > *ira->new_irb.exec->backward_branch_quota) {26907 if (new_quota > *ira->new_irb.exec->backward_branch_quota) {