as-if rule
The C++ rule that lets the compiler change your code in any way at all, as long as the program's visible behaviour stays the same.
Under the as-if rule ([intro.abstract]) an implementation need only reproduce the observable behaviour of the abstract machine - volatile accesses, data written to files, and interactive input and output - for programs without undefined behaviour.
See also