I have a port without div or mod machine instructions. I wrote divmodsi4 patterns that do the libcall directly, hoping that GCC would recognize the opportunity to use a single divmodsi4 to compute both quotient and remainder. Alas, GCC calls divmodsi4 twice with the same divisor and dividend operands. Is this supposed to work? Is there a special trick to help the optimizer recognize the redundant insn? I saw the 4yr-old thread regarding picochip's desire for the same effect and followed the same approach implemented in the current picochip.md (as well as my own approach) but no luck.

G

Reply via email to