On Friday, 29 August 2014 at 17:33:14 UTC, Ola Fosheim Grøstad
wrote:
On Friday, 29 August 2014 at 17:29:49 UTC, deadalnix wrote:
Indeed, undefined behavior can be anything, by definition, and
this cannot. Still, removing undefined behavior and replace it
by undefined values cause the optimizer to have to prove that
load/store won't fault, which is going to kill any expectation
of performance.
I still don't understand what kind of fault your are talking
about.
Granted if you store in more than one location you have to make
at least one move, but if you only store in one location you
have the same situation as if you are optimizing:
a=a;
Clearly you can remove this without doing any loads or stores?
No, as the load or the store involved can fault/trap.