asb wrote: Could we add tests for this please? I know we have macro-fusion-lui-addi.ll already though I'm not sure .ll tests are the best for this. PowerPC's macro-fusion.mir test seemed like a nice way to handle it, to my eye at least. https://github.com/llvm/llvm-project/pull/70012