The last layoffs at Microsoft were largely cutting products, it was an utter failure IMHO- there were very few teams who were allowed to hire and so many rockstar devs taking a chance on products which got cut were left in the cold. I saw way too many awesome devs get pushed out of the company because their product was canceled and the project they wanted to work on had no headcount.