Your question ignores timeframes. I’m happy to argue that P(stock rises in the next 5 years |AGI in 20 years)≈P(stock rises in the next 5 years) for all stocks.
I’m a professional equity investor, and trust me, the market isn’t that forward-looking. Unless you believe in AGI within the next 10 years, I suggest ignoring it when it comes to picking investments. Because for the intermediate timeframe until the market begins to take the concept seriously, the value of your investments will be determined by all the other factors which you’re ignoring in favour of focusing on AGI, so unless you want your investment results to be meh for years-to-decades, then don‘t go for some all-out bet on AI.