While oil stocks have been the best performers in 2022, Sunoco has struggled. The stock is down 11% this year, but Mizuho has confidence in it. On Thursday, the firm upgraded Sunoco shares to a buy from neutral, citing the company's business model, balance sheet strength and compelling distribution yield. In the long term, the company's flexible business model "should prove resilient," Mizuho's Gabriel Moreen said in a note. "2020 operational outperformance gives us confidence in SUN's earnings resilience," he said. "Admittedly the current backdrop presents a new challenge that will further define the interplay of volumes versus margin on SUN's financial results. But the severity of demand destruction in 2020 and SUN's subsequent EBITDA growth (+11% y/y) were compelling evidence of the partnership's business model flexibility, in our view." He also noted that rising prices and demand destruction over the long term are mutually exclusive, and the company can only be punished for one or the other. The firm attributes the selling in Sunoco shares this year to concerns about how rising fuel prices could impact its wholesale margins. However, the stock-s performance this month seems more focused on demand destruction, Moreen said. Sunoco shares are down more than 12% in June. "In other words, SUN seems to have suffered the worst of both worlds in terms of investor sentiment, and we believe both cannot be true at once for an extended period of time," he said. "There may be a short-lived scenario where margins compress and volumes decline, but the economic feedback loop is self-correcting. All in all, we have little reason to doubt SUN's earnings resilience." To be sure, Mizuho trimmed its price target on the shares to $44 from $46, "to embed some conservatism around demand destruction and increase interest expense given SUN's higher-than-modeled revolver borrowings," Moreen said. The new target implies upside of 21% from Thursday's close. —CNBC's Michael Bloom contributed reporting.