Aftereffects from the U.S.-China trade war and a boom in demand for tech hardware in the wake of the pandemic last year have semiconductor stocks flying high. Chip manufacturers can't keep up at the moment, and a global chip shortage is looking likely for at least the remainder of 2021.

Two top plays on the industry are Advanced Micro Devices (AMD -5.44%) and Taiwan Semiconductor Manufacturing (TSM -3.45%), but one looks like a better buy right now.

One of these chip companies is not like the others

Why compare these two stocks? Many investors might forget that AMD spun off its fabrication business, GlobalFoundries, over a decade ago. AMD is one of many chip research and design companies. When it comes to actual manufacturing, it taps a company like GlobalFoundries or TSMC to fabricate its chip creations. AMD and TSMC are thus two different ways to invest in the same trend.

Someone in a lab suit holding a semiconductor.

Image source: Getty Images.

There's another key difference: AMD is a small scrappy company competing against giants like Intel and NVIDIA. It's been successfully scooping up market share in recent years -- especially against "chipzilla" Intel -- and has enjoyed rising profit margins as a result. AMD's pending acquisition of Xilinx looks to build on this trend.

AMD Revenue (TTM) Chart

Data by YCharts.

By contrast, TSMC is an industry juggernaut. It passed up Intel a couple of years ago and is now the largest chip fab in the world -- by a wide margin. The company claims its $45.6 billion in sales in 2020 gives it some 57% global market share of the chip manufacturing market. TSMC has been able to claim this dominant role in worldwide chip fab and distribution due to its advanced manufacturing tech. Its fabs handle the smallest and most powerful semiconductors around powering trends like AI and 5G. It's also a highly profitable company (though profit margins fluctuate as manufacturing supply and demand ebbs and flows) and pays a dividend that currently yields 1.5% a year.  

TSM Revenue (TTM) Chart

Data by YCharts.

Put another way, AMD (which doesn't dole out a dividend) is more of a high-growth stock, while TSMC is a slower-growth company (relatively speaking) with a more stable business and a dividend payment. That alone might help you decide which is the better long-term stock for you -- one with high growth potential (but that is more volatile) versus a dividend-paying business.

The better chip deal of the moment

Nevertheless, there's more to the story here that might affect your decision, and it has to do with the aforementioned AMD takeover of Xilinx. At 57 times trailing-12-month free cash flow and 25 times one-year forward expected earnings, TSMC has a premium price tag for a company with slower growth potential. Granted, the company's outlook for 26% year-over-year sales growth in the second quarter of 2021 is nothing to balk at. But lofty expectations are priced into the current share price (and TSMC stock price is up over 120% in the last 12 months).

By contrast, AMD share prices have basically flatlined since late last summer and are up "only" 50% in the last year. It's a more "expensive" stock at 124 times trailing-12-month free cash flow, but just 31 times one-year forward expected earnings. Good things are expected here after the highly profitable Xilinx is added to the fold. Xilinx has hauled in nearly $3.1 billion in revenue over the last year, which will boost AMD's overall sales by a third. But even without Xilinx, AMD management said it expects its first-quarter 2021 sales to surge about 79% year over year as it picks up more share of the PC and data center design markets.

The result? AMD actually looks pretty cheap as the Xilinx acquisition still doesn't appear to be fully reflected in the current share price. Over the long term, I think AMD stock will be a wilder ride than Taiwan Semiconductor, but there's lots of growth potential here. Thanks to the chip supply shortage, semiconductors are a hot investment theme -- and AMD looks like a great pick right now.