Shares of Advanced Micro Devices (AMD -1.14%) are down 28% since touching an all-time high of $227.30 last month. The dip coincides with recent weakness in the major market indexes, but analyst Frank Lee at HSBC believes the stock could climb back to its previous high based on AMD's opportunity to supply the growing demand for chips needed for artificial intelligence (AI).

Lee has upgraded AMD from hold to buy and raised his price target from $180 to $225, representing 38% upside over the current share price of about $163.

Why buy AMD stock

With the December launch of the MI300 chip, AMD has its sights set on capturing the soaring demand for AI GPUs. Management previously estimated it would generate over $2 billion in data center GPU revenue this year but recently raised that forecast to more than $3.5 billion based on early customer interest in the MI300.

This market has been dominated by Nvidia, whose H100 GPU is widely used across the major cloud service providers, such as Microsoft Azure and Amazon Web Services. However, the recent dip for shares of AMD shows there's some skepticism the company will be able to put competitive pressure on its bigger rival.

But Lee believes AMD's lower share price has "reset expectations" for growth and sets up a potential rebound for the stock. The HSBC analyst predicts AMD could see enough demand to even surpass management's AI revenue guidance.

The stock trades at a high forward price-to-earnings ratio of 45, so AMD will have to show improving growth to justify the premium valuation. On that note, AMD expects its AI chip business to expand quickly over the next several years, which should lead to robust earnings growth.

If the company reports better-than-expected sales for the MI300 this year, its share price could indeed head toward the analyst's price target in the near term.