Samsung shares rose on Thursday, dragging Asian chipmakers higher after the South Korean technology giant posted “better than feared” earnings guidance for the second quarter.The numbers assuaged investors’ concerns about rising inflation, deteriorating consumer demand and higher material costs for semiconductor firms, though analysts cautioned that demand weakness may not have fully run its course yet.Chip stocks have been hammered this year amid a tornado of concerns, including supply chain disruptions, the Russia-Ukraine war, rising material costs and rampant inflation that threatens consumer demand for products like smartphones. A few days ahead of Samsung’s earnings guidance, U.S. chipmaker Micron warned of softening demand for consumer products.That set the backdrop for Samsung’s results.But Samsung was up more than 3% on Thursday after saying it expects second quarter revenue to rise 22% year on year to 77.78 trillion Korean won ($59.8 billion), in line with expectations. Operating profit is expected to grow around 12% to 14.12 trillion Korean won, though that was the slowest rise in more than two years and missed expectations.However, the results were “better than feared,” SK Kim, analyst at Daiwa Capital Markets, told CNBC’s “Street Signs Asia” on Thursday.Samsung’s earnings guidance brought on a rally in other Asia semiconductor stocks on Thursday. Taiwan Semiconductor Manufacturing, one of the world’s largest chipmakers, rallied 5%, while rival United Microelectronics Corporation was up more than 7%. South Korea’s SK Hynix was nearly 2% higher.”It’s more like a relief of the fears before the results, as investors have oversold tech stocks,” Dale Gai, research director at Counterpoint Research, told CNBC via email.Samsung chip strengthSamsung did not release a breakdown of results for each business segment. That will come later this month. But its component business accounts for nearly 60% of total operating profit and consists of chips that go into products ranging from servers in data centers to smartphones and laptops. Samsung also designs and manufactures semiconductors.Sanjeev Rana, analyst at CLSA, told CNBC he expects profit at Samsung’s semiconductor business to have risen 19% quarter on quarter. Rana said that a better product mix among Samsung’s so-called memory chips, plus a stronger U.S. dollar, likely helped the technology giant. Samsung’s chip sales are mainly in U.S. dollars but it reports the profit in Korean won.Daiwa’s Kim said that memory chips likely saw a decline in shipments, but the company’s design and foundry business probably saw “double-digit operating profit margin” in the second quarter, which helped boost the chip division. A foundry is a chipmaking service through which a company may design and manufacture semiconductors for another firm. TSMC is the world’s largest foundry.A decline in smartphone sales and TVs is expected to be a drag on the company’s results.Uncertain futureDespite Samsung’s chip strength in the second quarter, analysts are expecting near-term headwinds.”Tech companies saw a big demand deterioration only from the last month of 2Q and weak demand has yet to run its course in my view,” Rana said in an email.Meanwhile, “chip inventory is reaching a very high level,” according to Counterpoint Research’s Dai. High inventory levels of semiconductors suggest demand is weakening, which could also increase supply and put pressure on prices.But Rana said that some of the excess supply issues could ease.”(A) lot of the bad news is also in the price and for stocks like Samsung and Hynix the investors seem to be betting that the two companies might also announce memory production or capex cuts just a Micron announced last week,” Rana said.Samsung shares are down around 25% this year, while SK Hynix has fallen 28%.Meanwhile, Samsung has been facing delays in securing production equipment or semiconductors, which could also add to a slowdown in its memory chip production, Rana added.Given these factors, Rana said, Samsung’s strategy of building up its inventory of certain chips “is right,” adding that the market may be underestimating the challenges Samsung will face on memory chip production in 2023.