Stocks remained at session highs by mid-afternoon Tuesday as crude oil recovered a level above $44. 

The S&P 500 was up 1%, and the Nasdaq added 1%. The Dow Jones Industrial Average climbed 1.1%, its best gains since mid-April.

Crude oil rocketed higher on Tuesday, recovering from a selloff a day earlier. Sentiment improved as wildfires in Canada reduced the nation's oil production capacity. The blaze has forced 11 producers and three pipeline operators to limit operations.

"Petroleum prices are on the rebound after Monday's drop, with the bulls reasserting the market's upward potential on the basis of recent production outages, including the 1.0 mmbpd drop in Canadian oil sands output due to wildfires," said Tim Evans, energy futures specialist at Citi.

A monthly report from the Energy Information Administration also boosted prices. The energy watchdog increased its forecast for West Texas Intermediate crude  in 2017 by nearly 25% to $50.65 a barrel. 

West Texas Intermediate crude oil recovered from slight losses earlier in the session to trade 2.3% higher at $44.43 a barrel.

The energy sector was one of the best performers on markets Tuesday. Major oilers including Exxon Mobil (XOM - Get Report) , Chevron (CVX - Get Report)  and ConocoPhillips (COP - Get Report) were all higher, while the Energy Select Sector SPDR ETF (XLE - Get Report) rose 1.5%.

Job openings in March hit their highest level since mid-2015, according to the latest Job Openings and Labor Turnover Survey. March job opening rose to 5.76 million, while the hiring rate was slightly lower at 3.7% from 3.8% in February.

Gap (GPS - Get Report) fell 12% after warning of lower-than-expected sales in its first quarter. The retailer, which reports on May 19, said quarterly sales fell 6% to $3.44 billion, a steeper decline than an expected 3% drop. The company is also evaluating options for its international Old Navy and Banana Republic chains.

Credit Suisse (CS - Get Report) posted a quarterly loss that was narrower than expected as it made progress on cost cuts. The Swiss lender did see a sharp decline from quarterly profit to loss over the first three months of the year as markets suffered from a selloff to start 2016. January and February were "some of the most difficult markets on record," said CEO Tidjane Thiam. Shares were up 4%.

Allergan (AGN - Get Report) rose 4% after announcing a new $10 billion stock repurchase program. The drugmaker said it plans to repurchase $4 billion to $5 billion in stock over the next four to six months. The company also earned an adjusted $3.04 a share in its first quarter, 4 cents higher than estimates.

Allergan is a holding in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio . Want to be alerted before Cramer buys or sells AGN? Learn more now.

Lumber Liquidators (LL - Get Report) tumbled 6% as it continued to face the fallout from a product safety scandal last year. The flooring company reported a first-quarter loss of $1.20 a share, far steeper than a loss of 29 cents a share a year earlier. Expenses surged 20% after legal fees increased $13.5 million. The company has been in embroiled in legal issues since it was accused of selling laminate flooring containing carcinogenic chemicals.

Dean Foods (DF - Get Report)   topped first-quarter estimates. The milk and dairy company swung to a quarterly profit as lower raw milk prices boosted margins. Dean Foods earned an adjusted 45 cents a share, 7 cents above expectations. Revenue fell to $1.88 billion as total volume slid 3.2%, though was as expected.