preames wrote: For the record, I can also implement this as the dag combine expansion if anyone wants. I'd actually implemented that originally before figuring out the generic code could handle this case at all. https://github.com/llvm/llvm-project/pull/87105