Semiconductor stocks had a forgettable 2022, as the 32% decline in the PHLX Semiconductor Sector index so far this year shows us. The drop is mainly due to the slowdown in the personal computer (PC) and smartphone markets that knocked the wind out of the sails of major players in this sector. But recent action shows that the sector is set to end the year on a high.

The PHLX Semiconductor Sector is trading up 10% in the past month. This sharp recovery can be attributed to signs of cooling inflation, the Federal Reserve's stated intent to reduce the pace of rate hikes, and some solid quarterly reports from industry bellwethers indicating that the industry didn't lose all of its momentum.

The sector's performance in the past month rubbed off positively on shares of Advanced Micro Devices (AMD -5.44%) and NXP Semiconductors (NXPI -1.93%). While AMD stock shot up 18% in the past month, NXP is up 8%. It wouldn't be surprising to see these chipmakers continue their bull runs in 2023.

That's why investors may want to buy these two semiconductor stocks hand over fist before the new year. Let's look at the reasons why AMD and NXP Semiconductors could soar higher in 2023.

1. Advanced Micro Devices

Advanced Micro Devices was hamstrung by the slowdown in the PC market this year, but the company found growth in other areas. This explains why AMD was able to record 29% year-over-year growth in revenue in the third quarter of 2022 to $5.6 billion. The chipmaker is on track to finish 2022 with $23.5 billion in revenue, which would be an increase of 43% over last year.

There are a few simple reasons why AMD has been able to record such impressive growth.

The first is the data center business, which is showing no signs of slowing down. AMD's data center revenue increased 45% year over year to $1.6 billion in Q3 thanks to the healthy demand for its Epyc processors. The segment generated $4.4 billion in revenue in the first nine months of 2022, indicating that AMD could generate just under $6 billion in data center revenue this year based on the quarterly revenue run rate.

AMD's data center revenue could keep soaring in 2023. That's because the company is gaining market share against Intel (INTC -2.40%) in this space. Its server processor market share increased to 17.5% in the third quarter, with Intel holding the rest, according to Mercury Research. The year-over-year increase in AMD's server market share stood at 7.3 percentage points.

That was a huge increase, and analysts are expecting AMD to sustain that momentum in 2023 as well. KeyBanc analyst John Vinh said he expects AMD to take more market share away from Intel next year, as the former's latest Genoa server processors -- which were released this month -- are reportedly 55% faster and 48% more power efficient compared to Chipzilla's offerings. With Intel's next-generation Sapphire Rapids server processors caught up in delays and yet to hit volume shipments, the road is clear for AMD to take more market share in the lucrative server processor space.

As such, don't be surprised to see AMD's 2023 server share exceed market research firm TrendForce's forecast of 22%, given that it has already exceeded the 15% market share it was expected to clock in 2022.

The embedded business is going to be another key growth driver for AMD next year. The segment's revenue increased nearly 1,550% year-over-year last quarter to $1.3 billion, driven by the acquisition of Xilinx that AMD completed earlier in 2022. This move helped AMD unlock a massive growth opportunity, as Xilinx's chips are used for accelerating workloads in multiple areas ranging from data centers to 5G infrastructure to automotive to aerospace and defense.

The demand for field-programmable gate arrays (FPGAs), for instance, is expected to increase at an annual pace of 14% through 2027 to $15.5 billion. With Xilinx being the leading player in this market, it could substantially boost AMD's revenue in the long run.

All this indicates that AMD has enough catalysts in the bag to sustain its growth in 2023 and beyond, which is why investors should consider buying this semiconductor stock before it goes higher.

2. NXP Semiconductors

NXP Semiconductors has been winning big from the growing adoption of chips in the automotive space, as the company gets more than half of its revenue from this niche. In the third quarter of 2022, for instance, NXP's total revenue jumped 20% year over year to $3.45 billion. The automotive business did the heavy lifting, as this segment's revenue increased 24% year over year to $1.8 billion.

The good news for NXP investors is that the automotive business is set up for another solid year in 2023. That's because the Dutch chipmaker's non-cancelable and non-returnable (NCNR) order book for 2023 exceeds its supply capability, and its automotive chips are sold out for next year. More importantly, the automotive market should be a long-term growth driver for NXP, as the company sees this segment's revenue jumping from $50 billion in 2021 to $150 billion by the end of the decade.

The industrial and Internet of Things (IoT) market is turning out to be another key growth driver for NXP. The segment's revenue was up 17% year over year last quarter to $713 million, accounting for almost 21% of the company's top line. Just like the automotive business, NXP's industrial chips are sold out for 2023, suggesting that this segment's growth is here to stay.

As such, NXP Semiconductors stock seems well-placed to sustain its rally in the new year thanks to the lucrative semiconductor niches it serves. What's more, investors are getting a great deal on the stock right now, as it is trading at just 16 times trailing earnings and 12 times forward earnings. Those multiples represent a discount to the S&P 500's earnings multiple of 19, suggesting that investors shouldn't delay any further and consider buying the stock before it runs higher.