Both Intel (INTC -1.79%) and Advanced Micro Devices (AMD 0.69%) have had their own successes in the semiconductor space. Intel was a dominant force in the PC era, still commands a huge lead in the server space, and is positioning itself for more growth in new markets. Meanwhile, AMD has built out strong graphics processing unit (GPU) offerings and semi-custom chips for gaming consoles.

When investors are trying to see which semiconductor stock is the better buy, it can be difficult to choose. So to help you get a better understanding of which company might be the better long-term play, let's take a look at where each company might be headed:

INTC Chart

The case for Intel

Intel has long been a dominant force in the processor space and some of its recent moves should help ensure that it's able to transition to new and lucrative opportunities. 

One such opportunity is the growing cloud computing space, which is currently seeing an explosion in spending. Companies are expected to shift $1 billion in IT spending to the cloud between 2015 and 2020, according to Gartner. That's great news for Intel, which should benefit from this shift as it already commands about 98% of the data center market share right now. Estimates by Morningstar peg Intel's growth from its data center business at 9% compound annual growth rate (CAGR) through 2021, based on cloud computing opportunities. 

But it's not just the company's data center growth that investors should be watching. Intel is also looking to semi-autonomous cars as a new area for growth. The company is in the process of buying the advanced driver assistance system (ADAS) company, Mobileye (MBLY) for $15 billion, which could help increase sales of its processors into driverless cars in the near future. 

Mobileye is a leader in the ADAS space, with about 70% market share, and snatching up the company will not only expose Intel to the $77 billion driverless car market but also give the company the opportunity to sell more chips to carmakers that use ADAS systems. 

This strategy is part of a broader push by Intel to expand its Internet of Things opportunities. Already, the company's IoT business is its fastest-growing segment -- jumping 15% year over year in 2016 -- and now accounts for more than 4% of its total revenues. 

Intel isn't looking to Mobileye's revenues (which were just $358 million last year)  but rather to how it will help the company be better positioned for the coming driverless car market. 

"We are looking beyond just the revenue it's going to grow into. If you look at where autonomous vehicles are going, you have to make a deal in order to be there in 2021 when models hit the road," Intel's CEO, Brian Krzanich, told Bloomberg last month.

The case for Advanced Micro Devices

AMD plays second fiddle to its key competitor, NVIDIA (NVDA 0.76%), in the graphics process unit (GPU) market. Right now, the company holds about 29.5% of the discrete desktop GPU market share (up from 21.6% last year), with NVIDIA taking up the rest.  But AMD isn't content with its current position. The company will release its new Vega GPU architecture later this year, which is expected to take NVIDIA's high-end GPUs head-on.

Despite AMD's second-place position, it managed to bring in its GPU sales to their highest level in 11 quarters in its most recent quarter ending in Q4 2016.

In addition to GPU sales for computers, AMD also sells semi-custom chips for Sony and Microsoft's video game consoles, and Microsoft is planning to release its new Project Scorpio device during the holidays later this year. Morningstar analyst Abhinav Davuluri believes that this new device, as well as ongoing sales to Sony, should bring low double-digit growth for AMD's semi-custom business through 2021. 

The verdict 

Both companies are doing a great job of positioning themselves for future growth, making this "better buy" a tough decision. Ultimately, Intel's enormous lead in the server space gives it the slight edge in this face-off, as it should become a huge advantage in cloud computing.

AMD's stock price, of course, has been on a tear over the past 12 months -- skyrocketing 367% -- but the company is now trading at a forward P/E of about 42, compared to Intel's much lower 12. Thus, it appears investors may have already priced in AMD's future opportunities while leaving Intel looking like the cheaper buy.