Semiconductors are advanced computer chips that power the digital aspects of our lives, from smartphones to the cloud computing technology hosting our online experiences. The chip industry outperformed the broader stock market handily in the five-year stretch between 2016 and 2021, but it's not faring so well in 2022.

The iShares Semiconductor ETF (SOXX 1.30%) is a barometer for the sector, and it's down about 37% so far this year, substantially more than the 22% loss for the benchmark S&P 500 stock market index. Should investors be worried? Or should they treat this as a buying opportunity ahead of further gains? 

The semiconductor industry is projected to be worth more than $1.5 trillion annually by 2030. Part of the reason for that is its increasing importance to advanced new technologies (like those needed in electric vehicles). This suggests it might be worth picking up some chip stocks while they're trading at a discount to all-time highs. Here's why Axcelis Technologies (ACLS 1.48%) and Cohu (COHU 1.37%) are two great chip stocks to buy on the dip. 

1. Axcelis Technologies helps chip makers expand

The semiconductor industry is made up of more than just chip producers. Some companies have built an entire business around serving those manufacturers by providing various products and services. Axcelis Technologies is one of them. It makes ion implantation equipment, which is critical to the semiconductor fabrication process, and even though the industry is slowing, Axcelis is reporting record numbers this year.

Axcelis' equipment has a hand in producing semiconductors for a wide range of purposes, from the tiny chips in smartphones to high-powered hardware used in cars and in industrial applications. In June, the company announced multiple shipments of its Purion equipment to fabricators in Asia that intend to produce chips for automotive purposes, and it expects this area of the market to account for 30% to 40% of its sales during 2022. As cars grow more digitally capable, their appetite for advanced chips will only increase. 

For that reason, many chip makers are racing to expand their production capacity and require Axcelis' equipment to do so. As a result, the company currently has an $869 million order backlog -- its highest on record. 

In the second quarter of 2022, Axcelis grew its revenue by 50% year over year to $221 million, making it one of the fastest-growing companies in the semiconductor industry right now. It also grew its earnings per share by 140%, and it increased its full-year revenue guidance to $875 million, which would be the highest annual result in the company's history.

Axcelis stock is trading down 18% so far in 2022, so it's outperforming both the S&P 500 index and the iShares Semiconductor ETF. Still, it should be enough of a dip to make investors want to take a closer look. 

2. Testing and handling are Cohu's specialties

As semiconductors continue to grow more advanced, the production process is becoming more complex, so it's increasingly important to ensure quality standards are upheld. That's where Cohu comes in; the company manufactures testing and handling equipment for chips of all sizes, and it uses highly advanced technologies to detect structural defects before the product reaches the end user. 

When inspecting a semiconductor, Cohu uses true infrared combined with artificial intelligence algorithms to identify cracks as small as five micrometers; for context, the average human hair is about 70 micrometers thick. Not only can Cohu's technology spot these flaws, but it can also determine if they're simply cosmetic and don't need fixing. All in all, the company ensures chip makers get the highest possible yield from their manufacturing processes.

Unlike Axcelis, Cohu has experienced a slowdown this year. In Q2, its revenue shrank by 11.8% year over year to $217.2 million. But its gross margin expanded to 46.5% from 42.7%, so it was more profitable for the period despite making fewer sales.

There's other very good news on the horizon. Cohu generated $887 million in revenue in 2021, but the company's mid-term financial forecast projects an average of $1 billion in revenue each year for the next three to five years. Additionally, it expects to generate $4 in annual earnings per share. If it hits the mark, this would make its current stock price a bargain.

At $26.48 per share, $4 in earnings would place Cohu stock at a price-to-earnings (P/E) ratio of just 6.6. That's a whopping 60% cheaper than where the iShares Semiconductor ETF trades right now, with a P/E ratio of 16.6. Cohu has real potential to be a great long-term bet for investors at its current stock price.