What happened

Shares of KLA-Tencor (KLAC -4.95%) rose 14.7% in June, according to S&P Global Market Intelligence. The company makes the process diagnostic and control equipment used by semiconductor manufacturers, from advanced chips to displays to memory chips.

That's why its stock had sold off rather hard in May, when trade talks between the U.S. and China collapsed, sending the entire semiconductor sector into a tailspin.

However, June saw the broader market rebound, as hopes for renewed talks between the two countries grew in anticipation of the G20 conference. At that meeting, President Donald Trump and President Xi Jinping of China agreed to resume trade talks; this sent shares of global tech-hardware companies higher, KLA-Tencor included.

A side view of semiconductor equipment etching material onto a silicon wafer

Image source: Getty Images.

So what

As part of the new agreement, the Trump administration decided to hold off on implementing more tariffs as it had threatened in May. In addition, the administration indicated that it would likely ease restrictions on some equipment sales to Huawei, the Chinese tech giant, as long as those components weren't a threat to national security.

Prior to the meeting, there was fear that U.S. tech companies might be prevented from selling to one of their largest customers. That would have hurt profitability for KLA-Tencor's customers, and likely would have dampened purchases of diagnostic equipment down the road.

Now what

The memory sector is still dealing with oversupply, and several memory companies have indicated they will cut their spending in the near future, so KLA-Tencor still may see reduced sales to those customers this year and next. Last quarter, the memory segment made up 38% of KLA's shipments.

However, chip foundries are KLA's largest customer base, at 54% of shipments, and that segment is still set to grow this year, as advanced chip manufacturers continue to invest in smaller, leading-edge chips. The long-term trend toward smaller and more advanced chips bodes very well for KLA, as its equipment is essential for these difficult manufacturing processes.

Even after June's rise, with a price-to-earnings ratio around only 14, KLA-Tencor still seems like a solid bet.