What happened

Shares of General Motors (GM 4.37%) were trading higher on Wednesday after the Detroit auto giant reported first-quarter earnings that were much better than Wall Street had expected.

As of 1:15 p.m. EDT, GM's shares were up about 3.9% from Tuesday's closing price.

So what

GM reported its first-quarter earnings results before the U.S. markets opened on Wednesday, and they were really good. On a per-share basis, excluding one-time items, GM earned $2.25 per share in the first quarter, far above Wall Street's consensus $1.04 per-share estimate. Better yet for its investors, GM generated that big profit on revenue that was in line with Wall Street's estimates -- meaning that the surprise was a profitability surprise.

How did GM do it? Ironically, the ongoing global shortage of semiconductors that has forced automakers to cut production may have helped. GM has responded to the chip shortage by prioritizing production of its most profitable products (pickup trucks and its new full-size SUVs) and by prioritizing more profitable retail sales over deliveries to its fleet customers, the company was able to generate an outsize adjusted operating margin of 13.6% despite flat revenue.

A dark gray 2021 Cadillac Escalade, a large truck-based luxury SUV

GM's biggest and most profitable SUVs -- the Chevrolet Tahoe and Suburban, GMC Yukon, and Cadillac Escalade -- are all-new for 2021. Demand has been strong, and by prioritizing production of the big SUVs amid a chip shortage, GM was able to generate better-than-expected profits in the first quarter. Image source: General Motors.

GM also reiterated its upbeat full-year profit guidance and said that it now expects its 2021 results to come in at the high end of the ranges it provided in February. 

Taken together, that's why the stock is up today.

Now what

Auto investors should take note of the fact that GM seems to be navigating the chip shortage with less drama and fewer ill effects than many of its global rivals. Just in the last two weeks, Ford Motor Company, BMW, Honda Motor, and Chinese electric-vehicle maker NIO have all warned that the chip shortage will hit their production and earnings harder than they had expected.

Not GM. CEO Mary Barra did acknowledge that GM also expects to shuffle some of its production in the second quarter. But, she said, the shortage won't affect those profitable pickups and SUVs or GM's plans to launch a slew of electric vehicles over the next couple of years. 

Long story short: GM seems to be navigating the crisis more smoothly than its rivals, and that's probably bullish for the stock in the near term.