(Bloomberg) -- Taiwan Semiconductor Manufacturing Co.’s fourth-quarter revenue beat estimates of a decline, as demand from artificial intelligence players helped offset sluggish smartphone and laptop chip sales.

Hsinchu-based TSMC, the main chipmaker to Apple Inc. and Nvidia Corp., reported December sales of NT$176.3 billion ($5.7 billion), completing a NT$625.5 billion quarter. That matched earnings from the same period a year earlier, which was among TSMC’s highest quarterly results. The average analyst estimate for sales over the last three months was NT$616.2 billion.

Over the course of 2023, TSMC moderated its capital expenditure plans as the consumer electronics industry grappled with a glut of unsold inventory. The chipmaker signaled the trough in demand had been reached in the summer and recovery would begin to take hold in the months leading up to 2024. Overall revenue declined 4.5% last year, to NT$2.16 trillion.

While it outdid analyst expectations and its own guidance, TSMC’s $20.2 billion quarter still fell short of delivering growth. December sales were down 8.4% on the same month a year earlier, offering a mixed outlook for the year ahead. Executives including Chief Executive Officer C. C. Wei have said they they expect overall business to grow this year, and the company has seen its high-performance computing business boosted by demand for Nvidia and Advanced Micro Devices Inc.’s AI chips.

Earlier in the week, fellow chipmaker Samsung Electronics Co. posted its sixth successive quarter of declining operating profit, as it weathered the impact of muted consumer demand in its smartphone and memory businesses. Still, the latest report from the Semiconductor Industry Association showed the first growth in chip sales in over a year came in November, suggesting momentum is gathering for a resurgence in 2024.

Read more: World Chip Sales Return to Growth in Sign of Improving Demand

Upgrades to AI server farms and on-device AI applications are likely to drive an IT replacement cycle, according to HSBC analysts Ricky Seo and Hankil Chang. “For US cloud service providers, we expect capex to grow significantly, about 65% in 2024e. Additionally, AI server purchases will likely total 57% of their investments in 2024e, up from 8% in 2022,” they wrote in a note on Wednesday.

Apple Inc., arguably TSMC’s most important customer, has faced headwinds with its latest iPhone generation, especially in the world’s biggest mobile market of China. Several analysts have downgraded Apple this year on expectations of soft demand, and this week Jefferies said the iPhone sales slump in China is likely to deepen. The US company has also been hit by an expanded ban by Chinese agencies and state-owned companies ordering staff to keep iPhones and other foreign devices away from work premises.

--With assistance from Sam Kim.

(Updates with additional market details)

©2024 Bloomberg L.P.