This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, rs6000] Fix endianness issue with vmrgew and vmrgow permute constant recognition
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, David Edelsohn <dje dot gcc at gmail dot com>, cel at linux dot vnet dot ibm dot com
- Date: Wed, 16 Aug 2017 17:57:39 -0500
- Subject: Re: [PATCH, rs6000] Fix endianness issue with vmrgew and vmrgow permute constant recognition
- Authentication-results: sourceware.org; auth=none
- References: <f505c094-92a7-773b-a647-5b55673d13c8@linux.vnet.ibm.com>
Hi!
On Tue, Aug 15, 2017 at 04:14:21PM -0500, Bill Schmidt wrote:
> One of Carl Love's proposed built-in function patches exposed a bug in the Power
> code that recognizes specific permute control vector patterns for a permute, and
> changes the permute to a more specific and more efficient instruction. The
> patterns for p8_vmrgew_v4si and p8_vmrgow are generated regardless of endianness,
> leading to problems on the little-endian port.
Ouch.
> The use in rs6000.c of p8_vmrgew_v4sf_direct, rather than p8_vmrgew_v4si_direct,
> is arbitrary. The existing code already handles converting (for free) a V4SI
> operand to a V4SF one, so there's no need to specify the mode directly; and it
> would actually complicate the code to extract the mode so the "proper" pattern
> would match. I think what I have here is better, but if you disagree I can
> change it.
It's fine I think.
This is okay for trunk, thanks!
Segher