There is conflicting information about this matter. McCain says he gave ship movements but only on ships he knew were already moved from the locations he gave.
And frankly, I don't blame him for caving to torture. It was brutal, what was done to him.
But for him to turn around and claim that torture doesn't work is simply wrong.