Some optimization examples from Linux GCC
The examples were created using linux gcc:
gcc -O1 -S
Example 1
- Code Motion
Example 2
- Code Motion
Example 3
- Constant Propagation
Example 4
- Strength Reduction for Induction Variables