Microprocessors sit on a circuit board at the NXP Semiconductors NV pavilion at the Mobile World Congress in Barcelona, Spain.

A good day for Apple would usually be a good day for chip stocks.

But semiconductor stocks headed south, as Apple gained on Tuesday, the day before its much anticipated iPhone announcement. Apple was up 2.5 percent at $223.85, but the VanEck Vectors Semiconductor ETF was down 1.3 percent and the iShares PHLX Semiconductor ETF was down about 1 percent.

"Apple's been strong, and they've got a big launch tomorrow, and normally you would see stocks like Broadcom trading up right beside Apple because they're a big supplier for the iPhone," said Romit Shah, senior analyst at Nomura Instinet. Broadcom lost 3.4 percent. "I think the tensions with China and the potential for a trade war are really putting an overhang on some of these stocks."

Apple last week told the government that prices on many of its products would be affected by tariffs, and Intel, down 3 percent Tuesday, warned that tariffs would make it difficult to advance next generation technology.

In addition to the trade wars, some companies have their own issues, and tech stocks continue to slump.

Last week, KLA Tencor told investors at Citigroup's technology conference that its December quarter would be up less than thought due to weakness in the memory market. Concerns about weakness in memory continue to weigh on investor sentiment.

NXP Semiconductors met with analysts on Tuesday.

"This is a big semiconductor company that has a lot of exposure to the automotive market," said Shah. He said the company's comments on its outlook didn't satisfy analysts. The stock ended the day down more than 4 percent, spooking investors of other companies in the chip sector.

NXP was also recently left at the altar by Qualcomm which abandoned its buyout bid when the Chinese government failed to approve its acquisition.

Paul Hickey, co-founder of Bespoke Investment Group, said the fact that China blocked a major merger in the group was a negative and that could be weighing on valuations. Earlier Tuesday, however, Japan's Renesas Electronics said it would buy California-based Integrated Device Technology for $6.7 billion.

"They [semiconductors] haven't been leading for quite awhile," he said. "There's a general view there's going to be less consolidation and that took a way a bit of a premium."

Shah said stocks like Micron, off nearly 3 percent Tuesday, have been under pressure on concerns about weaker memory prices, which is fueled by talk of less spending on data centers. "The weakness in semis definitely could be a warning for tech. I don't see semiconductors deviating from the rest of tech for a long period of time. Something's got to be reconciled," he said. Chip weakness is sometimes seen as an early warning for computer makers and others.

Shah said it will be interesting to see how chips react following Apple's announcement Wednesday. It will be important to see where Apple prices the new iPhone as well, he said.

"That's important. Last year it turned out people weren't really willing to pay $1,000 for a phone as much as we expected," he said.

"Apple's story is multifaceted. You have an iPhone launch but you also have a story and a theme around their service business. Semiconductors don't benefit from rising services sales at Apple," Shah said.

"This year is kind of different. I feel it's been going on since the spring. The market has taken a glass half-full view with some of the semiconductor stocks," he added.