Micron Technology (MU - Get Report) shares traded sharply higher Thursday after the chipmaker posted  stronger-than-expected second quarter earnings and echoed semiconductor sector rivals by forecast an uptick in global demand over the second half of the year.

Micron said adjusted non-GAAP earnings for the three months ending in February, the company's fiscal second quarter, came in at $1.71 per share, down nearly 40% from the same period last year but 4 cents ahead of the Street consensus forecast. Group revenues, Micron said, slumped 20.55% to $5.84 billion but again topped analysts' estimates of $5.82 billion. Adjusted free cash flow for the period hit $1 billion, Micron said, while chip inventories rose 

Micron said it would cut capital expenditures this fiscal year to $9 billion, while forecasting revenues of between $4.6 billion and $5 billion that missed estimates compiled by Refinitiv, but predicted, as have most of its rivals in the chip sector, that semiconductor demand will accelerate in the second half of the year as inventory overhangs erode and global smart phone sales rebound. 

"We believe that 5G, foldable phones and upcoming innovations in augmented and virtual reality will drive sustained content growth for years to come and should reignite smartphone unit sales beginning in calendar 2020," CEO Sanjay Mehrotra told investors on a conference call late Wednesday. "n the data center market, the demand for memory has moderated this year following exceptional growth in the last two years."

"The slowdown in demand is a result of ongoing customer inventory adjustments, as well as software optimizations at some cloud customers," he added. "We expect growth to resume in the second half of calendar 2019 as we see improvement in our customers' inventory position."

Micron shares were marked 6.8% higher Thursday to change hands at $43.12 each, a move that would extend the stock's year-to-date gain to around 32% and value the Boise, Idaho-based chipmaker at around $50 billion.

"We think Micron is taking all the right steps," said BMO Capital Markets analyst Ambrish Srivastava. "The company is idling capacity and reducing wafer starts, lowering CapEx again, with plenty of firepower on that front if fundamentals were to get worse, and they likely will. All this while focusing on preserving (free cash flow). We see a return of 25% on shares from current levels and remain Outperform-rated."