US stock indices closed mixed on Wednesday as support from soft inflation data offset a selloff in chipmakers.

The S&P 500 gained 0.4% and the Dow rose 150 points, while the Nasdaq 100 dropped 0.3%.

Both headline and core producer prices undershot expectations in June, reinforcing the soft CPI released a day earlier and reducing the likelihood of a Fed rate hike at its upcoming meeting.

The data helped offset concerns over higher energy prices stemming from the escalating conflict between the US and Iran.

Morgan Stanley gained 0.2% after posting upbeat results, joining JPMorgan (+1.1%) and Goldman Sachs (+1.1%) in delivering strong earnings.

BlackRock surged 6.6% following its results, while J&J (-2.7%) fell after reporting earnings.

Meanwhile, hyperscalers rallied, with Microsoft (+2.8%), Amazon (+3%), and Alphabet (+3.2%) advancing after strong results from ASML. On the other hand, losses among heavyweight memory chipmakers and SpaceX (-0.6%) weighed on the Nasdaq.