It's hard to find a bigger set of winners on the stock market in recent weeks than cloud-computing stocks.

The software-as-a-service (SaaS) sector has surged since the market bottom with many names touching all-time highs, including Shopify (SHOP -0.63%)Okta (OKTA -2.31%)Twilio (TWLO -1.35%), and MongoDB (MDB -2.60%). In some cases, cloud companies are benefiting from specific trends related to the pandemic. The work-from-home movement has lifted shares of Slack (WORK) and Zoom Video Communications (ZM -1.10%) as those companies provide tools like online chat boards and videoconferencing that help enable remote work. Similarly, Shopify has capitalized on the shift to e-commerce with so many stores closed during the shutdown period.

Valuations in the sector were already looking stretched before the pandemic hit, and though many of these companies posted strong results in the first quarter, the pandemic's impact didn't start until March. Now, there are already some warning signs that the pandemic and the recession it's causing may have a greater impact than expected.

A digital image of a cloud.

Image source: Getty Images.

Legacy tech is already feeling the heat

Cloud stocks have surged in part by taking market share from legacy firms, but performance at older tech companies still reflects overall demand in the broader market, so cracks at legacy firms bode poorly for the enterprise tech sector as a whole. 

For example, Hewlett Packard Enterprise (HPE -1.76%) posted a 16% decline in sales in the quarter ended April 30 and is reducing executive compensation by 20% to 25%. Worse, it plans layoffs and other cost cuts that will save $1 billion in expenses annually, though it's unclear how many employees will be shown the door.  

On the earnings call, CEO Anthony Neri was blunt about the challenges wrought by COVID-19, saying:

This pandemic is unlike any other crisis we've faced, and it has brought significant economic disruption. Businesses and communities are struggling, supply chain productivity continues to be significantly constrained, and the demand environment is uneven.

That the company is laying off employees and cutting executive salaries shows it expects tough times to continue.

HPE isn't the only veteran enterprise tech company trimming its workforce. IBM (IBM -0.05%) just announced layoffs that are believed to be in the thousands across several states and departments. One commenter who lost their job said on thelayoff.com that this was one of the largest rounds of layoffs in the company's history.  

Both IBM and HPE have been on decline in recent years, even seeing revenue shrink, but they still represent more than $100 billion in annual sales in the enterprise tech world and therefore carry a lot of weight. By comparison, most popular cloud stocks have annual revenue under $1 billion.

Similarly, Dell also just announced it is cutting some employee benefits to conserve cash during the crisis. 

It's not just legacy firms

Cloud-computing companies haven't all been immune from the crisis. Cloudera (CLDR) issued a round of job cuts earlier this month, citing the "sustained disruption from COVID-19," according to an email to Channel Partners.  Nutanix (NTNX -1.14%), meanwhile, said it would furlough close to 1,500 employees on a rotating basis over the next six months due to uncertainty around the pandemic, though it posted otherwise solid results in its most recent quarter.  

Other companies see headwinds going into the second quarter. Alteryx (AYX), for example, forecast revenue growth of just 10% to 15% in the second quarter after recording 43% top-line growth in the first,  while Okta, one of the best-performing cloud stocks during the crisis acknowledged some near-term billings headwinds, though it did reaffirm its revenue outlook for the year. 

Uncharted waters

The cloud-computing industry has never really experienced a recession before as the industry was much smaller during the financial crisis. Many of today's popular cloud stocks didn't even exist during the last recession or were only in their infancy.

Salesforce (CRM -1.02%) was one of the first cloud stocks and one of the few around during the last recession. Its performance during that period may offer something of a cautionary tale about the current recession.

CRM Chart

Data by YCharts.

As you can see from the chart above, revenue growth went from more than 50% to just 20% in about a year as Salesforce very much experienced an impact from the recession and the slowdown in enterprise business growth. 

The good news, at least in this case, is that the company rebounded strongly from the recession.

CRM Chart

Data by YCharts.

As you can see, revenue growth has been better in every quarter since its nadir during the financial crisis.

That may indicate that cloud stocks should expect a slowdown in revenue growth over the coming quarters. Business growth is slowing down as layoffs and a decline in new job postings show, and companies are behaving cautiously with the uncertainty around COVID-19. Even companies that offer mission-critical software may see growth slow as their customers simply aren't growing as fast.

Over the longer term, there will likely be a bifurcation in cloud stocks. Those that remain leaders in their niches and benefit from evolving trends during the pandemic, like work-from-home, should thrive, while others may fall behind.

If the experience of Salesforce is any indicator, investors should expect some short-term pain even if the future is bright.