add_impl is meant to add
Some, and add
z if x is
None — essentially, if
None, it’s as if
z were given for both the sum and the first operand.
As you can see in the asm output, the former checks whether
Some before the loop, but the latter checks in the loop body, which is not wanted! How can i persuade rustc/llvm to hoist the check out of the loop in the safe version? or should i file an issue somewhere? (or will i just need to use