Semiconductor stocks are hot right now, largely due to the hype surrounding artificial intelligence. Advanced Micro Devices (AMD 2.37%) and Micron (MU 2.92%) can certainly benefit from this transformational technology. AMD sells high-powered accelerators aimed at training the most advanced AI models, and Micron manufactures the memory chips that are needed in gigantic quantities for AI workloads.

But before considering investing in AMD or Micron, you should know that both companies are dealing with significant headwinds.

Advanced Micro Devices

AMD's comeback in the PC CPU market has slowed as demand for PCs tumbles. Global PC shipments were down 30% year-over-year in the first quarter, according to Gartner, driven by oversupply and economic uncertainty.

Starting with its first-generation Ryzen CPUs launched in 2017, AMD has been chipping away at rival Intel's market share. Across desktop and laptop chips, AMD's market share stood at 17% in the first quarter. That may not seem all that high, but prior to Ryzen AMD's market share was in the single digits.

A combination of good products, cutting-edge manufacturing from TSMC, and a long list of missteps by Intel enabled AMD to mount this comeback. Sky-high demand for PCs during the pandemic also helped. Global PC shipments rose 4.8% in 2020 and soared another 14.8% in 2021.

On top of the collapse in demand for PCs, Intel has staged a comeback of its own. Starting with its Alder Lake chips and continuing with its Raptor Lake chips, Intel has largely reclaimed the performance crown outside of gaming. AMD's latest Ryzen 7000 series CPUs were priced too high at launch, and a deluge of last-gen CPUs still floating around meant that those overpriced CPUs were competing with both Intel and the Ryzen 5000 series. Ryzen 5000 retail pricing has been heavily discounted, and Ryzen 7000 pricing has been persistently below MSRP.

All of this has shown up in AMD's results. In the first quarter of 2023, AMD's client segment produced revenue of just $739 million, down a whopping 65% year over year. The segment also turned unprofitable, with operating income swinging by nearly $900 million in the negative direction. A demand recovery in the PC market is possible in the second half of the year, but AMD will still face the problem of a resurgent Intel. Intel is expected to refresh its Raptor Lake chips  this year while also launching its new Meteor Lake chips.

AMD does more than sell PC CPUs. The data center CPU business is holding up much better; the gaming segment, which includes graphics cards and semi-custom chips that power the major game consoles, is mostly holding its ground; and the embedded business is growing thanks to the acquisition of Xilinx. But the PC segment is a huge drag on the company right now, and it may take a while for that situation to change.

Micron Technology

Memory chips are commodities, which means that pricing is largely dictated by supply and demand. When supply swamps demand, pricing can fall off a cliff. That's exactly what's been happening this year for Micron.

Micron benefited from surging demand and strong pricing during the pandemic, but that situation rapidly reversed in recent quarters. Part of the problem is that Micron's customers are sitting on too much inventory, so they're ordering at a rate below consumption. Micron has responded by slashing production and cutting capex plans, but that hasn't stopped the bleeding.

Micron's revenue plunged 53% year over year in the fiscal second quarter to $3.7 billion, with sales falling across every business unit. The company posted a net loss of $2.1 billion, partly due to significant inventory write-downs. Free cash flow was also deeply negative, coming in at a loss of $1.8 billion. Things won't improve in the third quarter, with revenue expected to be essentially unchanged sequentially.

Average per-bit pricing was down more than 20% for both DRAM and NAND chips in the second quarter on a sequential basis. Eventually, the impact of production cuts and the completion of customer inventory corrections will bring supply and demand back into balance, but for now, pricing is extremely weak.

While Micron stock is down from its peak, it's been surprisingly resilient. The stock still trades well above pre-pandemic levels despite the company going through the worst downturn since the financial crisis. Micron does believe that its data center business has bottomed out, but the PC, graphics, and mobile businesses are still struggling.

With this downturn looking like it will last into 2024, investors considering Micron stock should know what they're getting into.