If you're looking for good deals in the stock market, you may want to consider currently underperforming investments with lots of long-term upside. One way to spot these types of stocks is to narrow your search to the ones that are near their 52-week lows. Generally, there's some bad news or a troubling outlook involved with these companies, which can make them risky buys. But if they prove their doubters wrong, they could provide you with better-than-expected returns.

Intel (INTC -0.65%), Cisco Systems (CSCO -1.10%), and PepsiCo (PEP -0.36%) are all down year to date, but they still could turn out to be good investments to hold in the years ahead.

1. Intel

Intel is proof that simply being a chipmaker isn't a recipe for a surging share price this year, despite all the hype around artificial intelligence (AI). With its shares down by 40% since January, it's clear investors aren't excited about the company's prospects.

Its revenue growth rate was a fairly modest 9% in the first quarter. More concerning, however, was its net loss of $437 million -- though that was at least a big improvement from the prior-year period, when Intel booked a net loss of $2.8 billion.

I'm optimistic that Intel can turn things around given the need for the U.S. to build up its domestic chip manufacturing capacity. Currently, U.S. tech companies are heavily dependent on overseas foundries, and the government is providing big incentives and support to make it easier for domestic companies to succeed in this area and become significant suppliers of chips in the future.

It'll require some patience, but with Intel's management focused on reducing costs and pursuing the opportunities in manufacturing computer chips, this could make for a great contrarian investment to hang on to, provided that you're OK with accepting some risk. Currently, the tech company's stock is trading within a dollar of its 52-week low of $29.73.

2. Cisco Systems

Networking and IT infrastructure giant Cisco could make for a good long-term buy. As companies upgrade their infrastructure to meet the growing needs of their AI-powered computers, demand for Cisco's products and services will likely rise. It provides solutions that cater to emerging AI trends, including AI-powered security and software options to help businesses get the most out of their next-gen technologies.

The problem is that it may take a while for much of that demand to materialize because companies are likely being selective about what they're spending money on in the current high-interest-rate environment. Keeping costs down will remain a priority for businesses until borrowing conditions improve. For the time being, Cisco may have a tough road ahead. The company's product revenues declined by 19% to just over $9 billion in its fiscal third quarter, which ended April 27.

At a time when investors are focused on stocks that are already benefiting from AI's growth, Cisco simply isn't standing out. However, that may change, and buying the stock before that happens could lead to some great returns for investors in the long run. Cisco hit a new 52-week low this week, and its price may get worse before it gets better.

3. PepsiCo

Raising prices has allowed PepsiCo to deliver strong returns amid inflation. However, as inflation cools down and the company's upcoming quarters are measured against the impressive comparable numbers from those prior periods, it seems probable that PepsiCo's growth rate will slow down.

In the fiscal quarter that ended March 23, the company's revenues rose by just 2% to $18.3 billion. That's not the type of growth that excites investors, especially for a stock that's trading at 25 times trailing earnings. A year ago, revenues were growing at a rate of more than 10%.

But prices are sticky and while they were quick to rise, they may not come down much from their current levels. And at higher price points and better margins, PepsiCo could be poised for continued growth in the long run as consumers come to accept the new elevated prices for the company's products. And as demand increases as economic conditions improve, PepsiCo should get back to growing at a higher rate.

There will likely continue to be some softness in the short term, but this stock can provide investors with great value in the long run. PepsiCo is trading just 6% above its 52-week low of $155.83 per share. And with a dividend that yields 3.3% at today's share price, investors may want to buy it not only for its reduced price but also to lock in that generous yield.