Morgan Stanley has downgraded high-flying chipmakers on concerns that the sector is overheated.

Semiconductor stocks like Advanced Micro Devices Inc. (AMD) and NVIDIA Corp. (NVDA) have been significantly outperforming the market for years. But AMD shares are up 52.5%, NVIDIA shares are up 33% so far this year, whereas the S&P 500 returned 7%.

Shares of the iShares PHLX Semiconductor ETF (SOXX) are up 12.9% year to date. In the last five years, this index has risen 200%, whereas the S&P 500 gained about 70%.

In response to these soaring valuations and with chip inventories rising to near 10-year highs, Morgan Stanley reduced its rating on the chip sector to "Cautious" from "In-Line." Essentially, the firm believes this industry will now underperform in the next year.

"The semiconductor cycle is showing signs of overheating," said Morgan Stanley analyst Joseph Moore in a note. "Cyclical indicators are flashing red and any contraction in lead times and/or demand slowdown could lead to a significant inventory correction … Furthermore, elevated inventory and stretched lead times leave no margin for error as any lead time adjustment or demand slowdown could drive a meaningful correction. Risk/reward is the poorest it has been in 3 years." (See also: Assessing the Trend in Chip Stocks.)

"Given the risks we see to semiconductor companies from an overheated semi cycle, we have been conservative in our estimates for broad-based companies," said Moore.

Morgan Stanley lowered its rating on Applied Materials Inc. (AMAT) from equal weight to overweight with shares are up 12% YTD. The rating for On Semiconductor Corp. (ON), with shares up 32% year to date, was reduced to underweight from equal weight.

Want to learn how to invest?

Get a free 10 week email series that will teach you how to start investing.

Delivered twice a week, straight to your inbox.