TSMC <2330.TW>, the world's largest contract chipmaker, underlined the strong recovery in the once-struggling sector as it clocked its biggest profit in three quarters and raised its capital spending target.

Makers of the chips used in the world's computers, mobile phones and other gadgets are bouncing back from their worst downturn, helped by back-to-school demand and as the benefits of China's massive stimulus package to boost consumer spending kick in.

Global semiconductor chipmakers such as Intel Corp , STMicroelectronics and Texas Instruments have sounded a note on optimism as they predict demand and prices to pick up in the second half of the year.

Since TSMC raised its capex, that shows it is optimistic about its outlook for the next 6-12 months, Derek Lin, a fund manager at Uni-President Asset Management.

Although second quarter results were quite good, it did not beat market expectations by too much, Lin said.

Taiwan Semiconductor Manufacturing Co (TSMC) expects its sales, gross and operating profit margins to rise in the third quarter sequentially. It raised capital spending for this year to $2.3 billion from $1.5 billion previously, company officials said on Thursday.

The company reported a net profit of T$24.44 billion ($743 million) in April-June, slightly better than market estimates of a T$23.3 billion profit and sharply higher than the first quarter's T$1.56 billion. TSMC's second quarter net profit was down 15 percent from a year ago.

For a graphic on TSMC's result, click:



As a result of improved demand outlook, customers' companies launching new products, and customers' inventory restocking, (the) second quarter saw a sharp rebound in the demand for semiconductors across all applications, TSMC said in a statement.

TSMC's results came a day after United Microelectronics Corp, <2330.TW>, the world's second largest contract chip maker, swung to a much bigger-than-expected quarterly net profit after three straight quarters in the red.

The world's two biggest foundries, which supply chips to fabless chip designers and chipmakers that are stepping up outsourcing to cut costs, have benefitted from Chinese consumers increasing spending on electronic devices.

TSMC is a key supplier to some of the world's top chipmakers such as Nvidia and AMD , and its results are closely watched as it serves as an indicator to the overall health of the industry.

The company has about a 50 percent share of the $20 billion market for custom-built chips. TSMC's shares have risen 27 percent so far this year, underperforming a 53 percent rise in the benchmark TAIEX share index <.TWII>.

Ahead of the results, TSMC ended down 0.9 percent in line with the broader market.

(Additional reporting by Faith Hung; Writing by Lee Chyen Yee; editing by Anshuman Daga)