Stifel is getting more bullish on AMD shares because of the chipmaker's rising profit margins and market share gains.

The firm raised its price target for Advanced Micro Devices shares by 81 percent, to $38 from $21, citing strong demand for its new products. The updated forecast is 22 percent higher than Wednesday's closing price. Stifel also reiterated its buy rating for the shares.

New products are helping expand gross profit margins (GM), analyst Kevin Cassidy said in a note to clients Wednesday, also crediting management's solid execution and a delayed competitive response from Intel. "We expect AMD's corporate GM to continue to increase for at least the next four quarters."

Cassidy predicts AMD's new products will raise the chipmaker's gross profit margin to 45 percent in the coming years versus his 40.1 percent estimate for the company's fiscal 2019.

AMD shares closed down less than 1 percent on Thursday.

The analyst cited media reports that Intel is facing a processor shortage due to its delayed transition to the 10 nanometer manufacturing process.

One nanometer equals one-billionth of a meter. Smaller nanometer chipmaking technologies historically have allowed companies to create faster, more power-efficient chips.

"Intel not only hasn't had a competitive response but is likely struggling to meet demand. This opens the door for continued market share gains by AMD, in our view," he said.

AMD's stock is significantly outperforming the market this year. Its shares are up 204 percent year to date through Wednesday versus the S&P 500's 9 percent gain. The company's stock is the top-performing name in the S&P 500 this year.