That's generally not legal in the U.S. or most of the EU. The company would have to establish a very significant paper trail to establish that these individual "performance-based" layoffs were not part of a layoff subject to WARN regulations (or their European equivalents which are even stricter). The hurdle is so large that no company has successfully pulled off such a feat, and many of the companies that tried ended up paying significantly more in penalties to their local Depts of Labor than they would have saved with this stunt.