https://github.com/davemgreen commented: Thanks - from what I can tell this looks OK now, it's looking good. I believe that because the two operands are equal this will work for big-endian as well as little endian. Does that sound correct? https://github.com/llvm/llvm-project/pull/93717