lukel97 wrote: > Can this be done in DAGCombine or does it need something that only codegen prepare can do? It can be done in DAGCombine, I can move it over if that's preferred https://github.com/llvm/llvm-project/pull/134306