By Kimberley Kao and Sherry Qin

Asian stock markets were locked in a tug of war in the first half of the year, caught between Middle East tensions and the artificial-intelligence boom that laid bare a chasm between AI haves and have-nots.

But cracks are appearing in the AI trade, whiplashing tech-heavy indexes as doubts about the profitability and sustainability of the AI buildout creep in.

South Korea, Taiwan and Japan--clear beneficiaries of the world's appetite for the components that power AI--were Asia's top three performing markets during the first half, shrugging of fears that an oil shock due to the Iran war could derail energy-importing economies.

Market "performance has increasingly depended on whether a market sits close to the AI supply chain," said Charu Chanana, chief investment strategist at Saxo.