You can just say something like "we're restructuring to focus on our core competencies". If you fire a bunch of non-critical staff, you just told investors "our revenue to cost ratio is about to get a lot better" and so if anything investors who have been watching the decline are going to recognize you are doing something about the problem.
Indeed, HP (or HPE and HP Inc.) has done many layoffs in the past few decades. I just narrowly dodged one a number of years ago. Pretty much always the goal is to simply reduce costs without reducing revenue (as much). Investors don't care how much staff you have, they just care if you are making money.