https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68695
--- Comment #16 from Andreas Krebbel <krebbel at gcc dot gnu.org> --- (In reply to Dominik Vogt from comment #15) > Providing that macro does fix the problem: > > #define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE) \ > if (GET_MODE_CLASS (MODE) == MODE_INT \ > && GET_MODE_SIZE (MODE) < (TARGET_ZARCH ? 8 : 4)) \ > (MODE) = TARGET_ZARCH ? DImode : SImode; > > But is it a good idea to define it in the first place? We do not define this for S/390 since we have plenty of instructions able to deal with smaller modes in registers. Defining this would prevent GCC from make use of these. Another problem is that on S/390 we more often require explicit sign/zero-extend instructions to perform promotions. In the case above one value is promoted to adhere to the ABI while the other isn't to make best use of the instruction set. We could try to do some measurements with the PROMOTE_MODE macro defined but I expect regressions with that. We probably would need something to estimate the cost of adding promotions.