Fix how we calculate the new permutation map of the transfer ops. Differential Revision: https://reviews.llvm.org/D110638