Apple's iPhone X is likely to be discontinued this year if earnings from one of the company's top suppliers is anything to go by, according to an analyst.

Taiwan Semiconductor Manufacturing, or TSMC, the world's largest semiconductor foundry company, revised its full-year revenue target to the low end of its forecast. Shares in the company closed 6.3 percent lower on Friday.

One of the biggest concerns for Neil Campling, the co-head of the global thematic group focusing on technology at Mirabaud Securities, is the oversupply of chips. This "has never been higher," according to Campling's note to clients Thursday. His firm has tracked inventory data at TSMC for over a decade.

The chipmaker's current situation could give investors concerns over AMS, Apple's key supplier of 3-D sensing technology in the iPhone X. The 3-D sensors are key for the Face ID feature that lets you unlock the device by looking at it.

TSMC's record inventory levels are due to Apple not buying components for any future iPhone X models, suggesting the device will be killed off this year, Campling said.

"With the declines in iPhone X orders and the inventory issue at TSMC at record highs, which basically reflect a need to burn off inventory. Why? Because the iPhone X is dead," Campling wrote in his note.