Re: redundant divmodsi4 not optimized away

2010-04-28 Thread Michael Matz
Hi, On Tue, 27 Apr 2010, Greg McGary wrote: (define_insn *udivmodsi4_libcall [(set (reg:SI 4) (udiv:SI (reg:SI 1) (reg:SI 2))) (set (reg:SI 1) (umod:SI (reg:SI 1) (reg:SI 2))) (clobber (reg:SI 2)) (clobber (reg:SI 3)) (clobber (reg:CC CC_REGNUM))

Re: redundant divmodsi4 not optimized away

2010-04-28 Thread Greg McGary
On 04/28/10 05:58, Michael Matz wrote: On Tue, 27 Apr 2010, Greg McGary wrote: (define_insn *udivmodsi4_libcall [(set (reg:SI 4) (udiv:SI (reg:SI 1) (reg:SI 2))) (set (reg:SI 1) (umod:SI (reg:SI 1) (reg:SI 2))) (clobber (reg:SI 2)) (clobber

Re: redundant divmodsi4 not optimized away

2010-04-27 Thread Greg McGary
On 04/26/10 22:09, Ian Lance Taylor wrote: Greg McGaryg...@mcgary.org writes: 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

redundant divmodsi4 not optimized away

2010-04-26 Thread Greg McGary
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

Re: redundant divmodsi4 not optimized away

2010-04-26 Thread Ian Lance Taylor
Greg McGary g...@mcgary.org writes: 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