This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, rs6000] PR59708, Fix operand ordering for 128-bit andc/orc
- From: David Edelsohn <dje dot gcc at gmail dot com>
- To: Pat Haugen <pthaugen at linux dot vnet dot ibm dot com>
- Cc: Segher Boessenkool <segher at kernel dot crashing dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 19 Dec 2014 19:46:09 -0500
- Subject: Re: [PATCH, rs6000] PR59708, Fix operand ordering for 128-bit andc/orc
- Authentication-results: sourceware.org; auth=none
- References: <54933DAE dot 8080203 at linux dot vnet dot ibm dot com> <20141219165422 dot GA15611 at gate dot crashing dot org> <20141219195046 dot GB15611 at gate dot crashing dot org> <54949843 dot 2030008 at linux dot vnet dot ibm dot com>
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 <pthaugen@linux.vnet.ibm.com> wrote:
> 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 be opnd1 in order for the split insns to be recognized.
>>>
>>> >
>>> >So fix rs6000_split_logical?
>>
>> That is, the call to it -- if operand[2] has the NOT, it should be
>> false, false, true instead of false, true, false.
>>
> Yes, that was my first attempt at fixing this problem, but ended up with an
> unrecognized insn for the following. Which is why I switched my approach to
> swapping operands in the patch.
>
>
> builtin-arith-overflow-7.c:80:1: error: unrecognizable insn:
> }
> ^
> (insn 537 536 538 35 (set (reg:DI 10 10)
> (and:DI (reg:DI 8 8)
> (not:DI (reg:DI 30 30)))) builtin-arith-overflow-7.c:76 -1
> (nil))
>