At least in clang, your variant is not any better: uninitialized reads return the special value `undef`, which the compiler can constant-propagate to both uses of `sparse_val`.
But then each `undef` can turn to a different value at each use, even if they both came from the same uninitialized read.
ynik|2 years ago