After falling into a bear market just a couple of months ago, the Nasdaq Composite is back to flirting with all-time highs as concerns over a trade war have been tamped down and fears about a recession have faded against solid earnings reports and macroeconomic data.

The recovery in the Nasdaq has been led by artificial intelligence (AI) stocks like Nvidia that are also hovering near all-time highs again, but not every tech stock is in that position. Let's take a look at two AI stocks that are trading at a discount to previous levels right now that are worth buying on the dip.

An investor looking at their phone and several monitors.

Image source: Getty Images.

1. ASML

ASML (ASML -0.66%) has one of the biggest competitive advantages in the whole tech industry. The company is the only maker of extreme ultraviolet (EUV) lithography equipment in the world. Chip manufacturers like Taiwan Semiconductor Manufacturing, Samsung, and Intel rely on ASML's equipment to make the most advanced chips on the market.

Given there is a boom in AI right now, you might think that would make the stock a big winner, but ASML stock is actually down over the last year (off 26%) as the semiconductor equipment industry has been in a down cycle, and ASML has seen a slowdown in demand from China. Last October, the company cut its 2025 guidance from a range of 30 billion to 40 billion euros to a range of 30 billion to 35 billion euros due to weakness in markets outside of AI and for delayed orders, as the business is more than just EUVs.

However, regardless of that recent weakness, ASML still looks like a good bet for long-term growth thanks to its position as the lone maker of EUV equipment and due to the growth in the semiconductor industry. The company only sells about 100 machines each quarter, so its business is naturally lumpy, but it's still growing. In the first quarter, it reported 46% top-line year-over-year growth to 7.74 billion euros.

ASML is targeting 44 billion to 60 billion euros in revenue in 2030 with a gross margin of 56% to 60%, up from a target of 51% to 53% this year. If ASML can hit that target, the stock looks like an easy winner, trading at a price-to-earnings ratio of 30 currently.

2. Advanced Micro Devices

Another chip stock also looks like a prime candidate to buy on the dip. Advanced Micro Devices (AMD 1.12%) stock is down roughly 40% from its peak last year. Like ASML, AMD has begun to bounce off its earlier lows as the company is building momentum in AI and beyond. It's also benefited from the perception that it's the strongest alternative to Nvidia in the data center GPU market.

In the first quarter, AMD reported revenue growth of 36% to $7.44 billion, driven by a 57% jump in the data center business to $3.7 billion in revenue, which management attributed to growth in its Epyc CPU and Instinct GPU chips.

Its client segment, focused on PCs, reported 68% growth to $2.3 billion, showing it's taking market share from rival Intel and seeing strong demand for its Zen 5 Ryzen processors.

That momentum and the massive demand connected to AI should favor AMD. The company is also making several acquisitions to boost its position in AI and beyond, including its recent acquisition of ZT Systems, a maker of servers, helping AMD vertically integrate downstream, though it sold off the manufacturing business, choosing to retain the design and customer service teams and benefit from ZT's expertise in rack-scale solutions. It's also acquired some AI start-ups.

AMD now trades at a forward P/E of 33 based on adjusted EPS estimates, and the company looks poised for long-term growth in AI and other areas in the chip industry, thanks to its broad range of components, growth momentum, and recent acquisitions. After a long slide, AMD looks ready for a recovery.