Hello! > This is actually Jakub's patch from the PR, with a few minor tweaks that were > needed to bootstrap > and pass the regression suite. The splitter was using operand 0 without > setting it first. It should've > been operand 2. Also, there was a division by zero that was causing an > invalid insn; fixed by > changing the INTVAL + 2 into INTVAL - 2. Finally, a reload_completed was > added at Jakub's > request.
PR rtl-optimization/65220 * config/i386/i386.md (*udivmod<mode>4_pow2): New. + "UINTVAL (operands[3]) - 2 < <MODE_SIZE> * BITS_PER_UNIT + && (UINTVAL (operands[3]) & (UINTVAL (operands[3]) - 1)) == 0" + "#" + "reload_completed" This should be "&& reload_completed", so it will also include the above condition in the split condition. OK for mainline with the above change. Thanks, Uros.