Shares of Advanced Micro Devices (AMD 0.69%) have been brutally battered in 2022 as investors have shunned richly valued technology companies amid rising interest rates, surging inflation, and the semiconductor shortage that's hurting the growth of chipmakers.

However, those who bought shares of AMD back in 2015 are still sitting on nice gains even after the huge slide in the company's stock price in 2022.

AMD Chart

AMD data by YCharts

As the chart above shows, AMD stock has gained nearly 3,000% since the beginning of 2015, easily beating the S&P 500. A $1,000 investment in the chipmaker at that time would now be worth just over $30,000. Such massive gains in AMD stock have been driven by impressive growth in the company's revenue and margins over the years, which have fueled impressive bottom-line growth. AMD's earnings have increased at a compound annual rate of nearly 40% over the past five years.

Not surprisingly, holding AMD stock over a long period of time has turned out to be a profitable bet for investors. The company's growing share in the central processing unit (CPU) market, the secular growth of the graphics cards space, the booming demand for data center server processors, and the healthy demand for gaming consoles have powered AMD's growth over the years.

AMD's addressable markets are going to get much bigger in the long run. So should investors buy AMD stock now following its 43% slide in 2022 in anticipation of solid gains over the next five years or so? Let's find out.

Is AMD stock worth buying now?

AMD stock is trading at 30 times trailing earnings right now. That's a massive discount when compared to the company's five-year average earnings multiple of 105. The forward earnings multiple of just 19 indicates that its bottom line is on track to grow significantly over the next year. What's more, AMD's forward earnings multiple is at par with the Nasdaq-100 index.

Buying AMD stock at its current valuation looks like a no-brainer, as the company is expected to maintain its terrific growth in the coming years. Analysts are anticipating nearly 33% annual earnings growth from AMD for the next five years, which isn't surprising given the size of the addressable markets it is serving. AMD's end markets could help the company replicate the growth trajectory it has witnessed since 2015.

It is worth noting that AMD finished 2014 with annual revenue of $5.5 billion and non-GAAP earnings of $0.06 per share. In 2021, AMD reported annual revenue of $16.4 billion and earnings of $2.79 per share, up 68% and 117%, respectively, over the prior year. AMD has achieved such healthy incremental growth in the past seven years thanks to market share gains in the client and server CPU markets against Intel, the robust demand for graphics cards used for PC (personal computer) gaming, and the arrival of a new generation of consoles.

These catalysts are here to stay and should supercharge the company's long-term growth.

Why the chipmaker's terrific run is here to stay

There are two factors that should help AMD sustain its impressive growth: growing demand for its chips and an improvement in the company's market share.

For instance, AMD's share of the server CPU market increased to 10.7% at the end of 2021 from 7.1% at the end of 2020, according to Mercury Research. That improved further to 11.6% in the first quarter of 2022. Bank of America estimates that AMD's server share could climb to 19% in 2023, and there is room for it to head as high as 35% in the long run.

AMD sees a total addressable market worth $42 billion in server CPUs, driven by the demand for its chips that power high-performance computing (HPC) data centers, enterprise servers, and cloud computing applications. AMD has taken steps to strengthen its server processor business with a key acquisition, and it is looking to push the envelope on the product development front with the launch of new chips starting later this year -- so its server business seems set for further growth.

Meanwhile, AMD sees tremendous momentum in the gaming business through the end of the decade. The company estimates that the number of gamers could hit 4 billion by 2030, compared to 3 billion currently. With 57% of gamers preferring consoles and PCs for their gaming, the demand for AMD's PC CPUs and semi-custom chips that power consoles such as the Sony PlayStation 5, the latest Microsoft Xbox devices, and Valve's Steam Deck should ideally head higher.

Not surprisingly, AMD sees a total addressable market worth $37 billion for gaming chips in the future. What's more, the company is also looking to leverage its expertise in making semi-custom chips into fast-growing niches such as metaverse, cloud gaming, automotive, augmented reality, and virtual reality. The chipmaker sees a $30 billion revenue opportunity for its custom silicon chips from these markets, and points out that it is already building relationships with the key players in this space to capture the market.

All of this indicates that it wouldn't be surprising to see AMD multiply a $1,000 investment impressively once again in the coming years, which is why it is a top growth stock to buy right now given its valuation.