[PATCH][gimplefe] Handle __VEC_PERM
Richard Biener
rguenther@suse.de
Mon May 20 07:17:00 GMT 2019
On Mon, 20 May 2019, Christophe Lyon wrote:
> On Fri, 17 May 2019 at 11:24, Richard Biener <rguenther@suse.de> wrote:
> >
> >
> > Bootstrap / testing in progress on x86_64-unknown-linux-gnu.
> >
> > Richard.
> >
> > 2019-05-17 Richard Biener <rguenther@suse.de>
> >
> > c/
> > * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
> > (c_parser_gimple_unary_expression): Likewise.
> > (c_parser_gimple_parentized_ternary_expression): New function.
> >
> > * gimple-pretty-print.c (dump_ternary_rhs): Handle dumping
> > VEC_PERM_EXPR as __VEC_PERM with -gimple.
> >
> > * gcc.dg/gimplefe-41.c: New testcase.
> >
>
> Hi,
>
> This causes an ICE on arm:
> /gcc/testsuite/gcc.dg/gimplefe-41.c: In function '_mm_add_sd':
> /gcc/testsuite/gcc.dg/gimplefe-41.c:39:1: error: vectors with
> different element number found in vector permute expression
> __v2df
> __v2df
> vector(2) double
> __v2di
> z_6 = VEC_PERM_EXPR <x_4(D), _7, { 2, 1, 0, 0 }>;
> during IPA pass: *free_lang_data
> /gcc/testsuite/gcc.dg/gimplefe-41.c:39:1: internal compiler error:
> verify_gimple failed
> 0xc47110 verify_gimple_in_cfg(function*, bool)
> /gcc/tree-cfg.c:5396
> 0xb0b673 execute_function_todo
> /gcc/passes.c:1963
> 0xb0bf3d do_per_function
> /gcc/passes.c:1645
> 0xb0c009 execute_todo
> /gcc/passes.c:2017
Hope this fixes it and the other issue.
Tested on x86_64-unknown-linux-gnu, applied.
Richard.
2019-05-20 Richard Biener <rguenther@suse.de>
PR testsuite/90518
* gcc.dg/gimplefe-40.c: Restrict to targets with appropriate
vector support.
* gcc.dg/gimplefe-41.c: Likewise.
Index: gcc/testsuite/gcc.dg/gimplefe-40.c
===================================================================
--- gcc/testsuite/gcc.dg/gimplefe-40.c (revision 271394)
+++ gcc/testsuite/gcc.dg/gimplefe-40.c (working copy)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target int128 } } */
+/* { dg-do compile { target { int128 && vect_float } } } */
/* { dg-options "-fgimple -Wno-psabi -w" } */
typedef float v4sf __attribute__((vector_size(16)));
Index: gcc/testsuite/gcc.dg/gimplefe-41.c
===================================================================
--- gcc/testsuite/gcc.dg/gimplefe-41.c (revision 271394)
+++ gcc/testsuite/gcc.dg/gimplefe-41.c (working copy)
@@ -1,8 +1,8 @@
-/* { dg-do compile } */
+/* { dg-do compile { target { vect_double && vect_long_long } } } */
/* { dg-options "-fgimple -Wno-psabi -w" } */
typedef double __v2df __attribute__ ((__vector_size__ (16)));
-typedef unsigned long __v2di __attribute__ ((__vector_size__ (16)));
+typedef unsigned long long __v2di __attribute__ ((__vector_size__ (16)));
__v2df __GIMPLE (ssa)
_mm_add_sd (__v2df x, __v2df y)
More information about the Gcc-patches
mailing list