ICG optimize (remove double 'ret' instructions)