Both Advanced Micro Devices (NASDAQ: AMD) and Intel (NASDAQ: INTC) have been riding high this year as a frenzy of chip demand has taken hold amid the artificial intelligence (AI) boom. The significant sell-off in the tech sector on June 23 has created a buying opportunity. So which stock is the better long-term investment?