GCC does quite a bit of this nowadays. It is quite impressive to see when you disassemble its output.