well they save at least a million dollars which is the difference between Wallace/Pavlovic and Shaq, plus the luxury tax hit that doubles that so up over 2 million. I'm sure the Cavs could probably throw in 3 million in cash as well. If Wallace retires, they would save a hell of a lot more.
There could also be other pieces like Barbosa thrown in and the Cavs send back cheaper contracts to phoenix, saving them a lot more money. Something like Shaq and Barbosa for Wallace, Pavlovic, and Gibson. Gibson is longer than Barbosa, but he is much cheaper so it would save Phoenix a bunch of money, especially next year when they are in luxury tax range.