Top chipmaker to invest $8.9 billion in Shanghai plant