If IBM actually had the ages of their employees available to the system that did the layoffs, then that would be age based discrimination. But I'd be willing to bet that wasn't a factor.
If you start with a pool of people with large salaries, and look for people not adding at least that much value to the business, you are going to find people who have that salary for reasons other than merit.
The discrimination, if any, was in their favor until the business couldn't afford to discriminate in their favor.