Semiconductor stocks just suffered their worst month in nearly 24 years, and ETF investors responded by buying more aggressively than ever.

The iShares Semiconductor ETF (NASDAQ:SOXX) plunged 22.1% in July, its worst monthly performance since December 2002.

Yet beneath that historic selloff, fund flows told the opposite story.

SOXX attracted $6.92 billion in net inflows during July, according to TradingView fund-flow data.

That was the largest monthly inflow since the ETF's inception.