This can happen with static const members (PR17612). It has the advantage
over just making constant folding smarter that it also enables the optimizer
to fold more complicated patterns, such as passing the static const member
by reference.
We only do this at -O1 or higher.
This seems more intuitive as:
Also, how do we know isConstant is true? Can you assert that it is like you do below?