Re: [PATCH, rs6000] PR59708, Fix operand ordering for 128-bit andc/orc

2014-12-19 Thread David Edelsohn
The canonical form has the NOT first. If the second operand needs the NOT, the operands need to be reversed when the new insn is created, in rs6000_split_logical, not in the pattern. Thanks, David On Fri, Dec 19, 2014 at 4:27 PM, Pat Haugen wrote: > On 12/19/2014 01:50 PM, Segher Boessenkool w

Re: [PATCH, rs6000] PR59708, Fix operand ordering for 128-bit andc/orc

2014-12-19 Thread Pat Haugen
On 12/19/2014 01:50 PM, Segher Boessenkool wrote: On Fri, Dec 19, 2014 at 10:54:22AM -0600, Segher Boessenkool wrote: >On Thu, Dec 18, 2014 at 02:48:46PM -0600, Pat Haugen wrote: > > ;; 128-bit ANDC/ORC > >+;; In the case where rs6000_split_logical is called, the NOT'd operand > >+;; must

Re: [PATCH, rs6000] PR59708, Fix operand ordering for 128-bit andc/orc

2014-12-19 Thread Segher Boessenkool
On Fri, Dec 19, 2014 at 10:54:22AM -0600, Segher Boessenkool wrote: > On Thu, Dec 18, 2014 at 02:48:46PM -0600, Pat Haugen wrote: > > ;; 128-bit ANDC/ORC > > +;; In the case where rs6000_split_logical is called, the NOT'd operand > > +;; must be opnd1 in order for the split insns to be recogni

Re: [PATCH, rs6000] PR59708, Fix operand ordering for 128-bit andc/orc

2014-12-19 Thread Segher Boessenkool
Hi, On Thu, Dec 18, 2014 at 02:48:46PM -0600, Pat Haugen wrote: > ;; 128-bit ANDC/ORC > +;; In the case where rs6000_split_logical is called, the NOT'd operand > +;; must be opnd1 in order for the split insns to be recognized. So fix rs6000_split_logical? > (define_insn_and_split "*boolc3_

[PATCH, rs6000] PR59708, Fix operand ordering for 128-bit andc/orc

2014-12-18 Thread Pat Haugen
The following patch fixes testsuite failures builtin-arith-overflow-[10,11].c. In the case where rs6000_split_logical() was being called the operands were swapped such that the wrong operand was being complemented. Bootstrap/tested on powerpc64-linux with no new regressions. Ok for trunk (and