This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, rs6000] Require Power 8 for vec_float2 builtin
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Carl Love <cel at us dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org, David Edelsohn <dje dot gcc at gmail dot com>, Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- Date: Fri, 16 Feb 2018 11:56:51 -0600
- Subject: Re: [Patch, rs6000] Require Power 8 for vec_float2 builtin
- Authentication-results: sourceware.org; auth=none
- References: <1518800329.7508.37.camel@us.ibm.com>
Hi!
On Fri, Feb 16, 2018 at 08:58:49AM -0800, Carl Love wrote:
> This patch changes the expansion macros to the equivalent Power 8
> macros. The test now cleanly exits with the message
>
> error: builtin function ‘__builtin_vsx_float2_v2di’ requires the ‘-
> mpower8-vector’ option
>
> rather then giving an internal compiler error when compiled with the
> cpu=power7 option.
:-)
> The patch was tested by running the full regression suite to ensure no
> new regressions were introduced. Additionally, the patch was tested by
> hand compiling with the -mcpu=power7 option to verify the issue is
> fixed. The testing was don on powerpc64le-unknown-linux-gnu (Power 8
> LE)
Do you have a new testcase, too? Or is this all covered by existing
tests (which?)
Looks great, thanks! Okay for trunk (and for backports after a while,
if needed).
Segher
> * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
> Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
> from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
> * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
> expansion to P8V_BUILTIN_VEC_FLOAT2.