Google will keep cutting costs to invest in AI even as revenue is up