These tech behemoths are seeing impressive gains from their artificial intelligence (AI) investments.