2.4.2.2. Example: Invalid Branch Optimization

// If x is 0 then set y to 0.
// Otherwise leave y unchanged.
if (x == 0) y = 0;
// If x is 0 then set y to 0.
// Otherwise leave y unchanged.
y = (x == 0) ? 0 : y;

Example adjusted from literature, see references.