Division by nonzero #54868
Labels
I-slow
Issue: Problems and improvements with respect to performance of generated code.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Rustc seems unable to use the fact that NonZeroU64 isn't zero:
Gives the asm (with -O):
Adding an assume() solves the problem:
Perhaps such assume() should be added at the end of NonZeroU64::get()?
The text was updated successfully, but these errors were encountered: