Evaluate repeat expression lengths as late as possible

This commit is contained in:
Oliver Scherer 2020-03-14 15:30:35 +01:00
parent 8ff785011b
commit 799b15ed96
46 changed files with 279 additions and 264 deletions

View file

@ -106,6 +106,9 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
}
}
let count =
self.monomorphize(&count).eval_usize(bx.cx().tcx(), ty::ParamEnv::reveal_all());
bx.write_operand_repeatedly(cg_elem, count, dest)
}