There's a lot of economic uncertainty today, but one thing that seems assured is that companies will invest more in artificial intelligence, both for internal automation and consumer-facing applications.

AI semiconductor stocks have, of course had quite a strong run this year. But recent angst over the economy and interest rates have caused even AI leaders to pull back heavily since August.

That may have opened up an opportunity for long-term investors to pick up shares with an eye toward the multiyear AI investment cycle. And two key players in the cycle are semiconductor equipment leader Lam Research (LRCX 2.65%) and Marvell Technology (MRVL 3.17%). But which is the better buy today?

What these companies do

Marvell is a chipmaker that makes a diverse array of chips for data centers, enterprise networking, telecommunications, and autos. It also has a small bit of consumer electronics exposure that totaled about 13% of revenue last quarter.

Marvell used to be pretty concentrated in storage controllers five years ago, but the company has been on an acquisition spree over the past six years or so, buying up companies that specialized in security system-on-chips (SoCs), customized application specific integrated chips (ASICs), optical transport modules, and ethernet switching both within and between data centers.

The result is a company that's fairly diversified in its product portfolio and end-market exposure, but is nevertheless concentrated on chips that help store and transport data quickly.

Meanwhile, Lam Research is a leader in etch and deposition equipment needed to make all kinds of semiconductors, from leading-edge and trailing-edge logic to DRAM and NAND flash memory, as well as advanced packages. More specifically, Lam is a specialist in tools that help chipmakers stack components in a vertical fashion, which is an extremely difficult and delicate process.

AI tailwinds for each

Marvell's acquisitions look fairly prescient in the age of AI, especially the optical transport, ethernet switching, and ASIC acquisitions, as these are products are now set to soar. Artificial intelligence clusters require a huge amount data transport, leading to booming demand for the company's optical digital signal processors and ethernet switching chips. In addition, certain cloud giants, namely Amazon Web Services, use Marvell's custom ASIC business to help build their own in-house-designed accelerators as an alternative to expensive Nvidia GPUs.

But the bulk of its AI revenue is likely largely in its ethernet and optics portfolio, including 800 gig digital signal processors that shoot data over long distances incredibly fast, as well as the company's new PHY Ethernet chips for lightning-fast communications for 5G, broadband, and cloud and enterprise networking.

Marvell previously indicated that its AI-related revenue would double this year, then again each of the next two years, because of booming demand. However, on the recent conference call with analysts, the company indicated that it was seeing even higher near-term demand for the second half of 2023 than previously thought.

Meanwhile, Lam Research has broader exposure to the entire sector, but especially AI. Artificial intelligence will require lots and lots of data storage and memory, as well as the most sophisticated leading-edge chips to run, not to mention new advanced packaging techniques that link all of these elements together in new ways.

Lam Research plays into all of these parts of the manufacturing process, as its etch and deposition tools are used to make all of these chips. But the reason Lam may benefit disproportionately is that leading-edge chips and packaging for AI is a manufacturing-intensive process that will probably require a step-up in capital intensity.

For instance, on the leading edge, foundries across the world are in the process of moving from FinFET transistor structures, with the gate on three sides of a transistor channel, to a gate-all-around structure, in which the channel is surrounded on all four sides by the gate and can therefore be stacked vertically.

The result is more powerful and efficient transistors and, therefore, more powerful and energy-efficient chips. But the good news is that since Lam Research's expertise is in vertical stacking, which it has sold into the 3D NAND subsector for the past 10 years or so, the GAA transition in logic chips should benefit Lam handsomely. Management believes the GAA transition could lead to an incremental $1 billion in revenue for every 100,000 wafer starts per month. Of note, the company made $17.5 billion in revenue over the past 12 months.

Financials

Even though both companies are poised to benefit from AI, each is posting year-over-year declines right now, given the slowdown in traditional data centers and consumer electronics. In fact, Marvell noted that while it expects exploding AI growth, its AI-related revenue is projected to exit this year at a $200 million-per quarter run rate, or $800 million annually. That compares with over $5.6 billion in trailing-12-month revenue overall, so only about 15% of the current run-rate.

Both companies' main legacy businesses are actually in storage technologies. Marvell leads in HDD and NAND flash-based controllers, and Lam Research has traditionally had an outsized portion on revenue in NAND flash equipment -- at least heading into the beginning of the year.

Even though AI is taking off, the storage industry has become vastly oversupplied, causing extreme weakness in that part of the market. Notably, while AI does wonderful things with data, companies aren't necessarily generating and storing more data than they already were.

The result has been a cyclical decline for both:

MRVL Revenue (Quarterly) Chart

MRVL Revenue (Quarterly) data by YCharts

As you can see, despite the slowdown, Lam has stayed profitable, even in one of the worst-ever downturns for NAND flash investment. In the June 2022-ending quarter, NAND flash made up 40% of Lam's revenues, but in the most recent June 2023-ending quarter, it made up just 18%. Fortunately for Lam shareholders, its other businesses are holding up better, and the company's service and spare parts revenues, which made up nearly half its revenue last quarter, are more tied to its installed base and therefore less volatile than equipment sales.

The same can't be said for Marvell, which doesn't really have recurring services revenue. Although Marvell is making adjusted (non-GAAP) profits, a good part of that "adjusted" profitability is due to stock-based compensation, which is a real cost to shareholders. Using its non-GAAP operating income minus stock-based comp over the past six months, Marvell made $258 million in operating income, or $516 million, annualized.

However, even on that basis, Marvell looks a tad expensive, with a market cap that is still north of $45 billion. In addition, Marvell is also more expensive than Lam on both a price-to-sales and forward P/E basis.

LRCX PS Ratio Chart

LRCX PS Ratio data by YCharts

The verdict

You can probably tell that I'm more bullish on Lam Research. Its ability to still generate meaningful profits and cash flow even in a downturn is a huge advantage, enabling it to reinvest in new technology while also repurchasing shares and paying a rising dividend. Meanwhile, Marvell is more expensive, isn't repurchasing stock, and doesn't pay a dividend.

While Marvell could see an inflection upward in its AI segment, it's not immediately clear how much that will lift its overall results. Meanwhile, Lam will also benefit, and given that we are in just about the worst NAND downturn ever, it's hard to imagine that getting worse than today. Lam is both the safer pick, and it may even have the better upside, too.