Rapidly expanding artificial-intelligence capabilities helped erase $300 billion in market value on Tuesday.