Forming sub with overflow should be beneficial on SystemZ, just like for additions.
When I tried doing this for i16 the code seems to get worse, so this is only done for i32 and i64.
Added tests also for the additions since I did not find any ones at the present.
(It seems we could have done (some of) this in SystemZElimCompare if we would recognize and handle Load Address in SystemZElimCompare, but IIRC that opcode isn't used that much for additions with an immediate.)
Why do you move it to the .cpp file? It still seems small enough to usefully inline ...