Micron (MU 2.92%) and Advanced Micro Devices (AMD 2.37%) represent two ways to invest in the expansion of the semiconductor market. Micron is a major producer of DRAM and NAND memory chips, while AMD sells x86 CPUs and discrete GPUs.

Both chipmakers are underdogs in their respective markets. Micron ranks second in DRAM and fifth in NAND, according to technology market intelligence firm TrendForce, while Samsung is the leader in both markets.

AMD controls 35% of the x86 CPU market, according to PassMark Software, and 10% of the discrete GPU market, according to JPR. Intel (INTC -9.20%) and Nvidia (NVDA 6.18%) lead the x86 CPU and discrete GPU markets, respectively.

A closeup view of a semiconductor wafer.

Image source: Getty Images.

Yet Micron and AMD both have technological advantages over their top competitors. Micron produces denser and more power-efficient DRAM and NAND chips than Samsung and its other rivals.

AMD produces more-advanced x86 CPUs than Intel because it outsources the production of its chips to Taiwan Semiconductor Manufacturing, which is currently one to two chip generations ahead of Intel in terms of transistor density and power efficiency.

AMD's lack of first-party foundries makes it a "fabless" chipmaker, while Micron is an integrated device manufacturer (IDM) that manufactures its own chips. Both chipmakers were severely affected by the post-pandemic slowdown of the PC market, yet shares of AMD and Micron have risen 59% and 36%, respectively, this year in anticipation of their eventual recovery. Let's see if either chipmaker is the better buy right now.

Micron's cyclical downturn could end soon

Micron's revenue has declined year over year for five consecutive quarters. That slowdown can be attributed to declining sales of PCs, the end of the 5G upgrade cycle for smartphones, China's regulatory ban on its chip sales to key infrastructure customers, and other macroeconomic headwinds.

The company's adjusted gross margins also stayed negative over the past three quarters as a global glut in memory chips -- exacerbated by overproduction throughout the pandemic-induced chip shortage -- caused its average selling prices to plummet.

Micron's revenue dropped 49% in fiscal 2023, which ended on Aug. 31, and it turned unprofitable by both generally accepted accounting principles (GAAP) and non-GAAP (adjusted) measures. But for the first quarter of fiscal 2024, the company expects its revenue to finally rise 3% to 13% year over year, while analysts expect 32% revenue growth for the full year. They also expect it to significantly narrow its adjusted net losses.

Micron attributes that positive outlook to warmer market demand, normalized inventory levels, content-share gains, and the expansion of the artificial intelligence (AI) market.

The company also said it was largely mitigating the regulatory headwinds in China by selling more chips to non-infrastructure customers, and it believes that memory prices have bottomed out and are poised to rise in 2025. Analysts expect its revenue to rise 44% in fiscal 2025 as its adjusted profits turn positive.

AMD faces a bumpier recovery

AMD's revenue declined year over year over the past two quarters as the PC market cooled and it lapped its acquisition of the programmable chipmaker Xilinx.

Its revenue fell 14% year over year in the first half of 2023, but management expects 2% growth in the third quarter as the PC market stabilizes and the CPU and GPU inventory levels finally normalize. Analysts expect its revenue to dip 3% in 2023 but rise 21% in 2024.

But that cyclical recovery could still be disrupted by Intel and Nvidia's latest moves. Intel has vowed to overtake Taiwan Semiconductor in the process race by 2025, which implies it will finally produce denser and more power-efficient chips than AMD again. AMD's share of the discrete GPU market also continues to shrink as its latest Radeon cards struggle to keep pace with Nvidia's more powerful and more power-efficient GeForce cards.

In the data center market, AMD's Epyc CPUs are gradually chipping away at Intel's industry-standard Xeon processors among cost-conscious customers, but its AI-oriented Instinct GPUs don't seem to be gaining ground against Nvidia, which supplies the GPUs for generative AI platforms like OpenAI's ChatGPT and DALL-E.

AMD's adjusted gross margins stayed above 50% over the past year, but it could lose its pricing power as Intel and Nvidia roll out their next-gen chips. For now, analysts expect AMD's adjusted earnings per share to decline 21% this year and rise 50% in 2024.

The valuations and verdict

Micron is tougher to value because it's unprofitable, but it has weathered cyclical downturns before and isn't expensive at four times this year's sales. AMD also looks reasonably valued at 25 times forward earnings and seven times this year's sales.

Both of these stocks are still promising long-term plays on the semiconductor sector. But if I had to choose one over the other, I would stick with Micron because it has a clearer path toward a cyclical recovery and faces fewer competitive headwinds.

AMD profited a lot from Intel's mistakes over the past few years, but I'm concerned that Intel's planned comeback could eventually derail AMD's long-term growth. AMD also still lacks a meaningful moat against Nvidia in the discrete GPU market.