AMD (AMD -0.35%) and TSMC (TSM -0.34%) have both soundly outperformed the Philadelphia Semiconductor Index's 10% gain over the past 12 months.

AMD's stock more than doubled as investors cheered the chipmaker's gains against Intel (INTC 0.64%) in the PC and data center markets. TSMC's stock advanced 20% as the top chipmaking foundry experienced a surge in orders from top customers like AMD, Apple, and NVIDIA (NVDA -3.33%).

AMD and TSMC were both fairly well-insulated from the COVID-19 pandemic. AMD even benefited from more people buying PCs to work from home, while TSMC still produced a steady stream of chips for its top customers. Will AMD continue to outperform TSMC and the broader market this year, or is it time for the Taiwanese foundry to take the lead?

A wafer of chips being manufactured.

Image source: Getty Images.

Understanding AMD and TSMC's businesses

AMD is the world's second-largest maker of x86 CPUs after Intel, and ranks second in the discrete GPU market after NVIDIA. It also supplies custom APUs, which merge together a CPU and GPU, for the PS4 and Xbox One gaming consoles.

AMD generated 70% of its revenue last year from its computing and graphic segment, which produces its PC CPUs and discrete GPUs. The remaining 30% came from its enterprise, embedded, and semi-custom (EESC) segment, which produces server CPUs, gaming console APUs, and other chips.

TSMC generated 49% of its revenue from the smartphone market last year. Another 30% came from the HPC (high-performance computing market), 8% came from the IoT (Internet of Things) market, 4% came from the automotive market, 5% came from the DCE (data communications equipment), and the remaining 4% came from other markets.

TSMC's production node of high-end 7nm chips, which are currently in high demand from AMD, Apple, NVIDIA, and other top chipmakers, accounted for the lion's share of its business and generated 27% of its revenue last year.

How fast are AMD and TSMC growing?

AMD's growth is driven by both its progress against Intel and NVIDIA and the cyclical growth of the CPU and GPU markets. TSMC is significantly larger than its only direct rival, Samsung's foundry unit, so its growth generally rises and falls with the broader semiconductor market.

Revenue Growth (YOY)

2015

2016

2017

2018

2019

AMD

(28%)

7%

25%

23%

4%

TSMC*

11%

12%

3%

6%

4%

YOY = Year-over-year. Source: AMD and TSMC annual reports. *In New Taiwan dollars.

AMD's new Ryzen CPUs, which were praised for their performance and low price points, have gradually gained ground against Intel -- which struggled with a chip shortage at its own foundry -- in the PC market over the past year. Its Epyc CPUs gained market share in data centers against Intel's Xeons, while its Radeon GPUs held the line against NVIDIA's latest GeForce GPUs.

Microsoft's Xbox Series X.

Image source: Microsoft.

However, the strength of those businesses was partly offset by declining sales of APUs for the aging PS4 and Xbox One, which are both nearing the end of their current generations. On the bright side, Sony and Microsoft plan to launch their AMD-powered successors, the PS5 and Xbox Series X, at the end of 2020. Wall Street expects AMD's strengths to offset its weaknesses with 28% sales growth and 72% earnings growth this year -- which arguably justifies its aggressive forward P/E ratio of 50.

Analysts expect TSMC's revenue and earnings to rise 14% and 23%, respectively, this year, which are also solid growth rates for a stock that trades at 19 times forward earnings. However, TSMC could struggle later this year as the pandemic delays launches of major phones like Apple's 5G iPhone, and its loss of Huawei's HiSilicon unit as a major customer (due to trade tensions) throttles its revenue growth.

Those headwinds, along with weak demand from the pandemic-stricken automotive market, could offset TSMC's potential gains in the HPC, DCE, and IoT markets from the expansion of 5G networks. In short, TSMC remains more exposed to macro headwinds than AMD, which relies on the comparatively stable PC, data center, and gaming console markets.

Moreover, weaker demand for TSMC's foundry services, particularly in the crowded 7nm process node, could inadvertently resolve any production bottlenecks and ensure that AMD receives a stable supply of next-gen Ryzen, Epyc, and Radeon chips.

The winner: AMD

AMD and TSMC are both still great long-term plays on the semiconductor market, but AMD's narrower focus and its consistent gains against Intel and NVIDIA make it the stronger investment right now. AMD is definitely a riskier investment, since Intel and NVIDIA will inevitably strike back against the smaller chipmaker, but I believe if faces fewer near-term headwinds than TSMC -- which still relies too heavily on the fickle smartphone market.