Advanced Micro Devices' (AMD 2.37%) share price has surged by 54% over the past year, and many investors are wondering if the semiconductor stock has more room to run. Part of its gains have been driven by investors' optimism that chip companies will continue to benefit from increasing demand for new technologies like artificial intelligence (AI). 

But to figure out whether or not AMD is a buy right now, let's look at what's going right for AMD and what could hold the company back. 

What's going wrong for AMD

A large portion of AMD's revenue comes from sales of its CPUs for personal computers. And while AMD has built a large business around this focus, that hasn't been much of a benefit lately. That's because PC shipments worldwide fell by 13% in the second quarter, according to IDC. 

A person holding a microchip.

Image source: GETTY IMAGES.

That lack of demand really hurt AMD's results. In Q2 -- its most recently reported quarter -- the company's client segment revenue, which includes PC chip sales, fell 54% due to slowing PC sales. It wasn't all bad news -- total client sales were up 35% sequentially to $998 million -- but that year-over-year decline understandably worried investors.

PC demand can fluctuate, so AMD could eventually see some rebound in chip sales for PCs, but it's also facing some other threats. First, Intel has made additional gains recently in the PC chip market that have eroded AMD's market share. 

In 2021, AMD had 39% of the PC CPU market; now, after losing ground to Intel, it has 35%. Intel could continue causing problems for AMD because it's building a new manufacturing facility that could help it ramp up semiconductor production -- an area where AMD currently has an advantage right now. 

What's going right for AMD

AMD's client revenue from PC chip sales was up on a sequential basis, indicating that the worst may be over in that segment. It's not out of the woods yet, but the sales growth is certainly a good sign. 

The company is also making some big moves to try and tap into the vast artificial intelligence chip business. It recently debuted a new line of MI300 data center graphics processing units (GPUs) and acquired an AI software company to help optimize its semiconductors for artificial intelligence uses. 

The AI chip market is worth $28 billion this year, and Statista estimates it will grow to be a $165 billion market by 2030, giving AMD a lot of potential to benefit. Artificial intelligence has emerged as one of the biggest tech trends -- with large tech companies investing billions of dollars to stake out their places in it -- and it's likely that chip companies will be winners thanks to the massive computing power that AI systems require. 

AMD is not a buy right now 

Despite some things going well for AMD right now, I think the negatives outweigh the positives right now. For one, PC demand could slow or stagnate again and weigh down AMD's PC chip sales. Additionally, if Intel does gain a manufacturing edge in that niche, it could put additional pressure on AMD. 

Secondly, while AI chips are a huge market, AMD is far behind rival Nvidia. The latter has been perfecting its GPUs for machine-learning data centers for years, and is now benefiting immensely from its early-mover lead. Nvidia's data center revenue soared 171% in its latest quarter -- in part thanks to AI chip demand -- and reached a staggering $10.7 billion. 

While AMD may hold onto a significant portion of the PC chip market and is getting its foot in the door in the AI market, it's not doing anything that shows it can outpace its competitors. For that reason, when considering a chip stock right now, it may be best to put your money elsewhere.