If you were looking for high-flying tech stocks earlier in 2019, Xilinx (XLNX) and NVIDIA (NVDA 1.89%) would have definitely been on your radar, as both of them were surging impressively on strong investor sentiment.

But tragedy struck in the form of the trade war, putting NVIDIA and Xilinx's prospects in hot water and ending the stocks' terrific runs. Xilinx cannot ship all of its chips to Chinese customers, and demand for NVIDIA's graphics cards could take a hit as the company is forced to increase prices thanks to the tariffs imposed by the U.S. government.

In such a scenario, which of these two chip stocks should you be putting your money on?

Confused man in front of a blackboard with question marks.

Image Source: Getty Images

The case against NVIDIA

Graphics cards manufacturers like NVIDIA could be hurt badly by the trade war, as a chunk of the company's supply chain is situated in China, according to CEO Jensen Huang. He also clarified that NVIDIA has "a few thousand" employees in China.

So importing components sourced from the China-centric supply chain into the U.S. means that NVIDIA may have to pay higher tariffs. The graphics specialist can either absorb those tariffs at the cost of its margins, or raise the price of its GPUs to pass on the increased cost to customers.

The situation became more challenging for NVIDIA after President Trump announced that the U.S. will now impose tariffs at a rate of 30% on $250 billion worth of Chinese goods, instead of the earlier 25%. But what's more concerning is that the Trump administration is imposing tariffs of 15% on the remaining $300 billion worth of Chinese imports beginning Dec. 15.

The import tariff on computer parts such as graphics cards and motherboards was raised in May this year to 25% from the prior 10%, causing a crash in NVIDIA stock. Those tariffs have now been hiked to 30%. What's more, tariffs on laptops are set to go into effect from Dec. 15.

So there's a good chance that NVIDIA will have to sell its graphics cards at a higher price thanks to the trade war. This isn't an ideal situation for the company to be in, as it has just been overtaken by rival Advanced Micro Devices in PC GPU shipments for the first time in half a decade.

Moreover, the U.S.-China trade war presents another kind of challenge for NVIDIA. Huang had said last year that China accounts for a third of NVIDIA's business. This is bad news for NVIDIA shareholders, as the negative effects of the trade war are contributing toward a slowdown in the Chinese economy.

The country's industrial production growth of 4.8% in July this year was the weakest pace in a decade. Another alarming data point was that retail sales increased 7.6% in July, down from the 9.8% growth witnessed in June.

If the Chinese start cutting back on purchases of graphics cards and laptops, NVIDIA's declining top-line might not be turning around anytime soon given its reliance on this market.

The case for Xilinx

Like NVIDIA, Xilinx is also reliant on Chinese companies such as Huawei for a portion of its revenue. But it doesn't have a single 10%-plus customer, which means that its exposure is not as high as NVIDIA's.

This is why Xilinx is still delivering impressive growth despite the trade war being in full swing. The chipmaker delivered 24% revenue growth in its last-reported quarter, even though it was not able to ship to Huawei thanks to export restrictions.

What's more, Xilinx's outlook for the current quarter suggests that the company is anticipating year-over-year revenue growth of 16% at the mid-point of its guidance range. So Xilinx is in a much better position compared to NVIDIA, which saw its revenue crash 17% annually during the second quarter of fiscal 2020.

Also, NVIDIA's revenue outlook of $2.9 billion for the current quarter puts its year over year revenue decline at just over 8%. But investors shouldn't rule out the possibility of more downside thanks to the recently hiked tariffs.

Xilinx, on the other hand, isn't as exposed to China as NVIDIA is. The company is enjoying terrific growth in fifth-generation (5G) markets across the globe, as shown by CEO Victor Peng's comments on the latest earnings conference call:

Despite our complete suspension of shipments to Huawei in the middle of the quarter, we saw continued strong demand at many of our wired and wireless customers in support of global 5G deployments.

Given that Huawei reportedly supplies 8% of Xilinx's total revenue, Xilinx should be able to offset the negative impact of export restrictions to the Chinese company by growing in other geographies where 5G networks are being deployed.

The advantage for Xilinx is that its programmable chips can be bought off the shelves and programmed by telecom companies deploying 5G networks. This allows them to reduce the time to market. A Gartner report points out that just 7% of telecom providers across the globe have rolled out 5G networks, so there's a huge addressable market for Xilinx out there as 5G is still in its early phases of growth.

Xilinx can take advantage of that opportunity thanks to its commanding market share in programmable chips and limited Chinese exposure.

The verdict

NVIDIA could be in much deeper trouble thanks to the trade war, and the stock's valuation is another reason why investors should stay away from it. With a trailing price-to-earnings (P/E) ratio of nearly 41, NVIDIA is relatively expensive compared to Xilinx's multiple of 29.

Paying a richer earnings multiple for NVIDIA doesn't make sense, especially because its revenue has been trending lower. Xilinx, on the other hand, has been able to maintain its double-digit growth despite the macroeconomic issues at play, and trades at a cheaper valuation. That is why it is a better bet than NVIDIA in the current circumstances.