On Fri, Jan 10, 2014 at 02:58:59PM -0700, Jeff Law wrote: > +2014-01-10 Jeff Law <l...@redhat.com> > + > + PR middle-end/59743 > + * ree.c (combine_reaching_defs): Ensure the defining statement > + occurs before the extension when optimizing extensions with > + different source and destination hard registers.
> --- /dev/null > +++ b/gcc/testsuite/gcc.c-torture/compile/pr59743.c > @@ -0,0 +1,22 @@ Please add a /* PR middle-end/59743 */ comment here. Ok with that change, thanks. > + > +typedef union { > + long all; > + struct { > + int low; > + int high; > + } s; > +} udwords; > +int a, b, c, d; > +void __udivmoddi4() { > + udwords r; > + d = __builtin_clz(0); > + r.s.low = 0; > + for (; d; --d) { > + r.s.high = r.s.high << 1 | r.s.low >> a; > + r.s.low = r.s.low << b >> 1; > + int s = -r.all; > + c = s; > + r.all--; > + } > +} > + Jakub