public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake
@ 2022-10-18 16:03 colin.king at intel dot com
  2022-10-18 16:06 ` [Bug middle-end/107304] " colin.king at intel dot com
                   ` (30 more replies)
  0 siblings, 31 replies; 32+ messages in thread
From: colin.king at intel dot com @ 2022-10-18 16:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304

            Bug ID: 107304
           Summary: internal compiler error: in convert_move, at
                    expr.cc:220 with -march=tigerlake
           Product: gcc
           Version: 12.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: colin.king at intel dot com
  Target Milestone: ---

compiling stress-ng using CLFLAGS=-march-tigerlake:

git clone https://github.com/ColinIanKing/stress-ng
cd stress-ng
make clean
CFLAGS=-march=tigerlake make -j 8
make stress-ng VERBOSE=
make[1]: Entering directory '/home/cking/repos/stress-ng'
CC stress-vecshuf.c
during RTL pass: expand
stress-vecshuf.c: In function 'stress_vecshuf_u128_4.arch_alderlake':
stress-vecshuf.c:107:39: internal compiler error: in convert_move, at
expr.cc:220
  107 | static double TARGET_CLONES OPTIMIZE3 stress_vecshuf_ ## tag ## _ ##
elements ( \
      |                                       ^~~~~~~~~~~~~~~
stress-vecshuf.c:139:1: note: in expansion of macro 'STRESS_VEC_SHUFFLE'
  139 | STRESS_VEC_SHUFFLE(u128,  4)
      | ^~~~~~~~~~~~~~~~~~
0x7f47b0cfb209 __libc_start_call_main
        ../sysdeps/nptl/libc_start_call_main.h:58
0x7f47b0cfb2bb __libc_start_main_impl
        ../csu/libc-start.c:389
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-12/README.Bugs> for instructions.
make[1]: *** [Makefile:504: stress-vecshuf.o] Error 1
make[1]: Leaving directory '/home/cking/repos/stress-ng'
make: *** [Makefile:488: all] Error 2

Without CFLAGS=-march=tigerlake it builds fine.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Bug middle-end/107304] internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake
  2022-10-18 16:03 [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake colin.king at intel dot com
@ 2022-10-18 16:06 ` colin.king at intel dot com
  2022-10-18 16:16 ` colin.king at intel dot com
                   ` (29 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: colin.king at intel dot com @ 2022-10-18 16:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304

--- Comment #1 from Colin Ian King <colin.king at intel dot com> ---
See: https://github.com/ColinIanKing/stress-ng/issues/235

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Bug middle-end/107304] internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake
  2022-10-18 16:03 [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake colin.king at intel dot com
  2022-10-18 16:06 ` [Bug middle-end/107304] " colin.king at intel dot com
@ 2022-10-18 16:16 ` colin.king at intel dot com
  2022-10-18 16:37 ` colin.king at intel dot com
                   ` (28 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: colin.king at intel dot com @ 2022-10-18 16:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304

--- Comment #2 from Colin Ian King <colin.king at intel dot com> ---
Created attachment 53724
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53724&action=edit
preprocessed source that can be compiled to show bug

This is the pre-processed output from stress-vecshuf.c, compiling it will
trigger the issue.

gcc-12 -c stress-vecshuf-post-cpp.c -march=tigerlake

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Bug middle-end/107304] internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake
  2022-10-18 16:03 [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake colin.king at intel dot com
  2022-10-18 16:06 ` [Bug middle-end/107304] " colin.king at intel dot com
  2022-10-18 16:16 ` colin.king at intel dot com
@ 2022-10-18 16:37 ` colin.king at intel dot com
  2022-10-18 18:30 ` [Bug target/107304] " hjl.tools at gmail dot com
                   ` (27 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: colin.king at intel dot com @ 2022-10-18 16:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304

--- Comment #3 from Colin Ian King <colin.king at intel dot com> ---
Created attachment 53725
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53725&action=edit
Got the issue down to a small reproducer

Ran code through gcc -E, hacked out the irrelevant code, got it down to the
smallest reproducer.

Notes: gcc-12 -c stress-vecshuf-repro-small.c -march=tigerlake

Removing "arch=alderlake" from target clones makes the issue disappear.
Making the for loop to a small number of iterations (e.g. 4) makes the issue
disappear too.
Compiling without -march=tigerlake makes the issue disappear too.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Bug target/107304] internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake
  2022-10-18 16:03 [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake colin.king at intel dot com
                   ` (2 preceding siblings ...)
  2022-10-18 16:37 ` colin.king at intel dot com
@ 2022-10-18 18:30 ` hjl.tools at gmail dot com
  2022-10-18 23:21 ` crazylht at gmail dot com
                   ` (26 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: hjl.tools at gmail dot com @ 2022-10-18 18:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2022-10-18
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> ---
Since the default is -march=tigerlake, it enables AVX512 in the middle end.
When "arch=alderlake" disables AVX512, we fails to expand AVX512 to non-AVX512
ISAs. It means that target_clones can't be more restrictive than the default.
We
should provide better diagnostics.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Bug target/107304] internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake
  2022-10-18 16:03 [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake colin.king at intel dot com
                   ` (3 preceding siblings ...)
  2022-10-18 18:30 ` [Bug target/107304] " hjl.tools at gmail dot com
@ 2022-10-18 23:21 ` crazylht at gmail dot com
  2022-10-18 23:37 ` crazylht at gmail dot com
                   ` (25 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: crazylht at gmail dot com @ 2022-10-18 23:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304

--- Comment #5 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to H.J. Lu from comment #4)
> Since the default is -march=tigerlake, it enables AVX512 in the middle end.
> When "arch=alderlake" disables AVX512, we fails to expand AVX512 to
> non-AVX512
> ISAs. It means that target_clones can't be more restrictive than the
> default. We
> should provide better diagnostics.

Is there any place checking ISA difference for target_clones?

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Bug target/107304] internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake
  2022-10-18 16:03 [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake colin.king at intel dot com
                   ` (4 preceding siblings ...)
  2022-10-18 23:21 ` crazylht at gmail dot com
@ 2022-10-18 23:37 ` crazylht at gmail dot com
  2022-10-18 23:44 ` hjl.tools at gmail dot com
                   ` (24 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: crazylht at gmail dot com @ 2022-10-18 23:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304

--- Comment #6 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to Hongtao.liu from comment #5)
> (In reply to H.J. Lu from comment #4)
> > Since the default is -march=tigerlake, it enables AVX512 in the middle end.
> > When "arch=alderlake" disables AVX512, we fails to expand AVX512 to
> > non-AVX512
> > ISAs. It means that target_clones can't be more restrictive than the
> > default. We
> > should provide better diagnostics.
> 
> Is there any place checking ISA difference for target_clones?

ix86_valid_target_attribute_inner_p?

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Bug target/107304] internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake
  2022-10-18 16:03 [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake colin.king at intel dot com
                   ` (5 preceding siblings ...)
  2022-10-18 23:37 ` crazylht at gmail dot com
@ 2022-10-18 23:44 ` hjl.tools at gmail dot com
  2022-10-19  1:27 ` crazylht at gmail dot com
                   ` (23 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: hjl.tools at gmail dot com @ 2022-10-18 23:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304

--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Hongtao.liu from comment #6)
> (In reply to Hongtao.liu from comment #5)
> > (In reply to H.J. Lu from comment #4)
> > > Since the default is -march=tigerlake, it enables AVX512 in the middle end.
> > > When "arch=alderlake" disables AVX512, we fails to expand AVX512 to
> > > non-AVX512
> > > ISAs. It means that target_clones can't be more restrictive than the
> > > default. We
> > > should provide better diagnostics.
> > 
> > Is there any place checking ISA difference for target_clones?
> 
> ix86_valid_target_attribute_inner_p?

It may not have all ISA infos.  Will this

diff --git a/gcc/config/i386/i386-options.cc b/gcc/config/i386/i386-options.cc
index acb2291e70f..1efaae132e9 100644
--- a/gcc/config/i386/i386-options.cc
+++ b/gcc/config/i386/i386-options.cc
@@ -2953,6 +2953,14 @@ ix86_option_override_internal (bool main_args_p,
      fine grained control & costing.  */
   SET_OPTION_IF_UNSET (opts, opts_set, param_vect_partial_vector_usage, 0);

+  if (!main_args_p
+      && &global_options != opts
+      && (((opts->x_ix86_isa_flags & global_options.x_ix86_isa_flags)
+     != global_options.x_ix86_isa_flags)
+    || ((opts->x_ix86_isa_flags2 & global_options.x_ix86_isa_flags2)
+        != global_options.x_ix86_isa_flags2)))
+    error ("Target ISAs are more restrictive than the default");
+
   return true;
 }

work?

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Bug target/107304] internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake
  2022-10-18 16:03 [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake colin.king at intel dot com
                   ` (6 preceding siblings ...)
  2022-10-18 23:44 ` hjl.tools at gmail dot com
@ 2022-10-19  1:27 ` crazylht at gmail dot com
  2022-10-19  2:41 ` hjl.tools at gmail dot com
                   ` (22 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: crazylht at gmail dot com @ 2022-10-19  1:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304

--- Comment #8 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to H.J. Lu from comment #7)
> (In reply to Hongtao.liu from comment #6)
> > (In reply to Hongtao.liu from comment #5)
> > > (In reply to H.J. Lu from comment #4)
> > > > Since the default is -march=tigerlake, it enables AVX512 in the middle end.
> > > > When "arch=alderlake" disables AVX512, we fails to expand AVX512 to
> > > > non-AVX512
> > > > ISAs. It means that target_clones can't be more restrictive than the
> > > > default. We
> > > > should provide better diagnostics.
> > > 
> > > Is there any place checking ISA difference for target_clones?
> > 
> > ix86_valid_target_attribute_inner_p?
> 
> It may not have all ISA infos.  Will this
> 
> diff --git a/gcc/config/i386/i386-options.cc
> b/gcc/config/i386/i386-options.cc
> index acb2291e70f..1efaae132e9 100644
> --- a/gcc/config/i386/i386-options.cc
> +++ b/gcc/config/i386/i386-options.cc
> @@ -2953,6 +2953,14 @@ ix86_option_override_internal (bool main_args_p,
>       fine grained control & costing.  */
>    SET_OPTION_IF_UNSET (opts, opts_set, param_vect_partial_vector_usage, 0);
>  
> +  if (!main_args_p
> +      && &global_options != opts
> +      && (((opts->x_ix86_isa_flags & global_options.x_ix86_isa_flags)
> +     != global_options.x_ix86_isa_flags)
> +    || ((opts->x_ix86_isa_flags2 & global_options.x_ix86_isa_flags2)
> +        != global_options.x_ix86_isa_flags2)))
> +    error ("Target ISAs are more restrictive than the default");
> +
>    return true;
>  }
>  
> work?

Looks reasonable to me.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Bug target/107304] internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake
  2022-10-18 16:03 [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake colin.king at intel dot com
                   ` (7 preceding siblings ...)
  2022-10-19  1:27 ` crazylht at gmail dot com
@ 2022-10-19  2:41 ` hjl.tools at gmail dot com
  2022-10-19  3:00 ` wwwhhhyyy333 at gmail dot com
                   ` (21 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: hjl.tools at gmail dot com @ 2022-10-19  2:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304

--- Comment #9 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Hongtao.liu from comment #8)
> (In reply to H.J. Lu from comment #7)
> > (In reply to Hongtao.liu from comment #6)
> > > (In reply to Hongtao.liu from comment #5)
> > > > (In reply to H.J. Lu from comment #4)
> > > > > Since the default is -march=tigerlake, it enables AVX512 in the middle end.
> > > > > When "arch=alderlake" disables AVX512, we fails to expand AVX512 to
> > > > > non-AVX512
> > > > > ISAs. It means that target_clones can't be more restrictive than the
> > > > > default. We
> > > > > should provide better diagnostics.
> > > > 
> > > > Is there any place checking ISA difference for target_clones?
> > > 
> > > ix86_valid_target_attribute_inner_p?
> > 
> > It may not have all ISA infos.  Will this
> > 
> > diff --git a/gcc/config/i386/i386-options.cc
> > b/gcc/config/i386/i386-options.cc
> > index acb2291e70f..1efaae132e9 100644
> > --- a/gcc/config/i386/i386-options.cc
> > +++ b/gcc/config/i386/i386-options.cc
> > @@ -2953,6 +2953,14 @@ ix86_option_override_internal (bool main_args_p,
> >       fine grained control & costing.  */
> >    SET_OPTION_IF_UNSET (opts, opts_set, param_vect_partial_vector_usage, 0);
> >  
> > +  if (!main_args_p
> > +      && &global_options != opts
> > +      && (((opts->x_ix86_isa_flags & global_options.x_ix86_isa_flags)
> > +     != global_options.x_ix86_isa_flags)
> > +    || ((opts->x_ix86_isa_flags2 & global_options.x_ix86_isa_flags2)
> > +        != global_options.x_ix86_isa_flags2)))
> > +    error ("Target ISAs are more restrictive than the default");
> > +
> >    return true;
> >  }
> >  
> > work?
> 
> Looks reasonable to me.

It doesn't work since we may use target attribute to disable MMX/SSE/SSE2.
This problem seems to be __builtin_shuffle related.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Bug target/107304] internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake
  2022-10-18 16:03 [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake colin.king at intel dot com
                   ` (8 preceding siblings ...)
  2022-10-19  2:41 ` hjl.tools at gmail dot com
@ 2022-10-19  3:00 ` wwwhhhyyy333 at gmail dot com
  2022-10-19  3:03 ` crazylht at gmail dot com
                   ` (20 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: wwwhhhyyy333 at gmail dot com @ 2022-10-19  3:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304

--- Comment #10 from Hongyu Wang <wwwhhhyyy333 at gmail dot com> ---
(In reply to H.J. Lu from comment #9)
> (In reply to Hongtao.liu from comment #8)
> > (In reply to H.J. Lu from comment #7)
> > > (In reply to Hongtao.liu from comment #6)
> > > > (In reply to Hongtao.liu from comment #5)
> > > > > (In reply to H.J. Lu from comment #4)
> > > > > > Since the default is -march=tigerlake, it enables AVX512 in the middle end.
> > > > > > When "arch=alderlake" disables AVX512, we fails to expand AVX512 to
> > > > > > non-AVX512
> > > > > > ISAs. It means that target_clones can't be more restrictive than the
> > > > > > default. We
> > > > > > should provide better diagnostics.
> > > > > 
> > > > > Is there any place checking ISA difference for target_clones?
> > > > 
> > > > ix86_valid_target_attribute_inner_p?
> > > 
> > > It may not have all ISA infos.  Will this
> > > 
> > > diff --git a/gcc/config/i386/i386-options.cc
> > > b/gcc/config/i386/i386-options.cc
> > > index acb2291e70f..1efaae132e9 100644
> > > --- a/gcc/config/i386/i386-options.cc
> > > +++ b/gcc/config/i386/i386-options.cc
> > > @@ -2953,6 +2953,14 @@ ix86_option_override_internal (bool main_args_p,
> > >       fine grained control & costing.  */
> > >    SET_OPTION_IF_UNSET (opts, opts_set, param_vect_partial_vector_usage, 0);
> > >  
> > > +  if (!main_args_p
> > > +      && &global_options != opts
> > > +      && (((opts->x_ix86_isa_flags & global_options.x_ix86_isa_flags)
> > > +     != global_options.x_ix86_isa_flags)
> > > +    || ((opts->x_ix86_isa_flags2 & global_options.x_ix86_isa_flags2)
> > > +        != global_options.x_ix86_isa_flags2)))
> > > +    error ("Target ISAs are more restrictive than the default");
> > > +
> > >    return true;
> > >  }
> > >  
> > > work?
> > 
> > Looks reasonable to me.
> 
> It doesn't work since we may use target attribute to disable MMX/SSE/SSE2.
> This problem seems to be __builtin_shuffle related.

Clang works properly as it overrides -march= to any target clones. I suppose we
can do similar things in ix86_valid_target_attribute_p

https://godbolt.org/z/v7xT1zahd

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Bug target/107304] internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake
  2022-10-18 16:03 [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake colin.king at intel dot com
                   ` (9 preceding siblings ...)
  2022-10-19  3:00 ` wwwhhhyyy333 at gmail dot com
@ 2022-10-19  3:03 ` crazylht at gmail dot com
  2022-10-19  3:11 ` hjl.tools at gmail dot com
                   ` (19 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: crazylht at gmail dot com @ 2022-10-19  3:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304

--- Comment #11 from Hongtao.liu <crazylht at gmail dot com> ---

> 
> https://godbolt.org/z/v7xT1zahd

The issue is still there without builtin_shuffle

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Bug target/107304] internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake
  2022-10-18 16:03 [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake colin.king at intel dot com
                   ` (10 preceding siblings ...)
  2022-10-19  3:03 ` crazylht at gmail dot com
@ 2022-10-19  3:11 ` hjl.tools at gmail dot com
  2022-10-19  3:20 ` hjl.tools at gmail dot com
                   ` (18 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: hjl.tools at gmail dot com @ 2022-10-19  3:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304

--- Comment #12 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Hongyu Wang from comment #10)
> 
> Clang works properly as it overrides -march= to any target clones. I suppose
> we can do similar things in ix86_valid_target_attribute_p

That will be wrong since target attribute can be used to disable vector
instructions.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Bug target/107304] internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake
  2022-10-18 16:03 [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake colin.king at intel dot com
                   ` (11 preceding siblings ...)
  2022-10-19  3:11 ` hjl.tools at gmail dot com
@ 2022-10-19  3:20 ` hjl.tools at gmail dot com
  2022-10-19  3:25 ` crazylht at gmail dot com
                   ` (17 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: hjl.tools at gmail dot com @ 2022-10-19  3:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304

--- Comment #13 from H.J. Lu <hjl.tools at gmail dot com> ---
A simple testcase:

[hjl@gnu-tgl-3 pr107304]$ cat y1.c
typedef struct {
    unsigned char v __attribute__((aligned(256))) __attribute__
((vector_size(64 * sizeof(unsigned char))));
} stress_vec_u8_64_t;

void __attribute__ ((target ("arch=core2")))
stress_vecshuf_u8_64(stress_vec_u8_64_t *data)
{
  data->v += data->v;
}
[hjl@gnu-tgl-3 pr107304]$ make y1.s
/export/build/gnu/tools-build/gcc-gitlab-debug/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/tools-build/gcc-gitlab-debug/build-x86_64-linux/gcc/
-march=tigerlake -S y1.c
during RTL pass: expand
y1.c: In function ‘stress_vecshuf_u8_64’:
y1.c:8:11: internal compiler error: in convert_move, at expr.cc:219
    8 |   data->v += data->v;
      |   ~~~~~~~~^~~~~~~~~~
0xe7c94c convert_move(rtx_def*, rtx_def*, int)
        /export/gnu/import/git/gitlab/x86-gcc/gcc/expr.cc:219
0xe8105c convert_modes(machine_mode, machine_mode, rtx_def*, int)
        /export/gnu/import/git/gitlab/x86-gcc/gcc/expr.cc:924
0xe9b586 store_field
        /export/gnu/import/git/gitlab/x86-gcc/gcc/expr.cc:7780
0xe92c98 expand_assignment(tree_node*, tree_node*, bool)
        /export/gnu/import/git/gitlab/x86-gcc/gcc/expr.cc:5904
0xcfb349 expand_gimple_stmt_1
        /export/gnu/import/git/gitlab/x86-gcc/gcc/cfgexpand.cc:3946
0xcfb73e expand_gimple_stmt
        /export/gnu/import/git/gitlab/x86-gcc/gcc/cfgexpand.cc:4044
0xd03a0c expand_gimple_basic_block
        /export/gnu/import/git/gitlab/x86-gcc/gcc/cfgexpand.cc:6096
0xd05f21 execute
        /export/gnu/import/git/gitlab/x86-gcc/gcc/cfgexpand.cc:6822
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
make: *** [Makefile:54: y1.s] Error 1
[hjl@gnu-tgl-3 pr107304]$

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Bug target/107304] internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake
  2022-10-18 16:03 [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake colin.king at intel dot com
                   ` (12 preceding siblings ...)
  2022-10-19  3:20 ` hjl.tools at gmail dot com
@ 2022-10-19  3:25 ` crazylht at gmail dot com
  2022-10-19  3:31 ` hjl.tools at gmail dot com
                   ` (16 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: crazylht at gmail dot com @ 2022-10-19  3:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304

--- Comment #14 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to H.J. Lu from comment #12)
> (In reply to Hongyu Wang from comment #10)
> > 
> > Clang works properly as it overrides -march= to any target clones. I suppose
> > we can do similar things in ix86_valid_target_attribute_p
> 
> That will be wrong since target attribute can be used to disable vector
> instructions.

But target_clones can't?
https://godbolt.org/z/jn6GMrdsb

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Bug target/107304] internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake
  2022-10-18 16:03 [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake colin.king at intel dot com
                   ` (13 preceding siblings ...)
  2022-10-19  3:25 ` crazylht at gmail dot com
@ 2022-10-19  3:31 ` hjl.tools at gmail dot com
  2022-10-19  3:55 ` crazylht at gmail dot com
                   ` (15 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: hjl.tools at gmail dot com @ 2022-10-19  3:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304

--- Comment #15 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Hongtao.liu from comment #14)
> (In reply to H.J. Lu from comment #12)
> > (In reply to Hongyu Wang from comment #10)
> > > 
> > > Clang works properly as it overrides -march= to any target clones. I suppose
> > > we can do similar things in ix86_valid_target_attribute_p
> > 
> > That will be wrong since target attribute can be used to disable vector
> > instructions.
> 
> But target_clones can't?
> https://godbolt.org/z/jn6GMrdsb

arch=nehalem will disable AVX.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Bug target/107304] internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake
  2022-10-18 16:03 [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake colin.king at intel dot com
                   ` (14 preceding siblings ...)
  2022-10-19  3:31 ` hjl.tools at gmail dot com
@ 2022-10-19  3:55 ` crazylht at gmail dot com
  2022-10-19 18:03 ` hjl.tools at gmail dot com
                   ` (14 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: crazylht at gmail dot com @ 2022-10-19  3:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304

--- Comment #16 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to H.J. Lu from comment #15)
> (In reply to Hongtao.liu from comment #14)
> > (In reply to H.J. Lu from comment #12)
> > > (In reply to Hongyu Wang from comment #10)
> > > > 
> > > > Clang works properly as it overrides -march= to any target clones. I suppose
> > > > we can do similar things in ix86_valid_target_attribute_p
> > > 
> > > That will be wrong since target attribute can be used to disable vector
> > > instructions.
> > 
> > But target_clones can't?
> > https://godbolt.org/z/jn6GMrdsb
> 
> arch=nehalem will disable AVX.

The question is should command line -mavx -march=nehalem disable avx?
I think the currect implementation only set not clear isa bits.

2173#define DEF_PTA(NAME) \
2174        if (((processor_alias_table[i].flags & PTA_ ## NAME) != 0) \
2175            && PTA_ ## NAME != PTA_64BIT \
2176            && (TARGET_64BIT || PTA_ ## NAME != PTA_UINTR) \
2177            && !TARGET_EXPLICIT_ ## NAME ## _P (opts)) \
2178          SET_TARGET_ ## NAME (opts);
2179#include "i386-isa.def"
2180#undef DEF_PTA

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Bug target/107304] internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake
  2022-10-18 16:03 [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake colin.king at intel dot com
                   ` (15 preceding siblings ...)
  2022-10-19  3:55 ` crazylht at gmail dot com
@ 2022-10-19 18:03 ` hjl.tools at gmail dot com
  2022-10-19 18:37 ` hjl.tools at gmail dot com
                   ` (13 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: hjl.tools at gmail dot com @ 2022-10-19 18:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304

--- Comment #17 from H.J. Lu <hjl.tools at gmail dot com> ---
Since this type

typedef struct {
    unsigned char v __attribute__((aligned(256))) __attribute__
((vector_size(64 * sizeof(unsigned char))));
} stress_vec_u8_64_t;

is processed outside of the function and AVX512 is enabled by default, it
has V64QImode instead of BLKmode.  If the target attribute disables AVX512,
V64QImode becomes unusable.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Bug target/107304] internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake
  2022-10-18 16:03 [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake colin.king at intel dot com
                   ` (16 preceding siblings ...)
  2022-10-19 18:03 ` hjl.tools at gmail dot com
@ 2022-10-19 18:37 ` hjl.tools at gmail dot com
  2022-10-19 19:49 ` hjl.tools at gmail dot com
                   ` (12 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: hjl.tools at gmail dot com @ 2022-10-19 18:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304

--- Comment #18 from H.J. Lu <hjl.tools at gmail dot com> ---
Can we update ix86_vector_mode_supported_p for cfun != NULL to issue an error
when a vector mode changes from valid to invalid?

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Bug target/107304] internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake
  2022-10-18 16:03 [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake colin.king at intel dot com
                   ` (17 preceding siblings ...)
  2022-10-19 18:37 ` hjl.tools at gmail dot com
@ 2022-10-19 19:49 ` hjl.tools at gmail dot com
  2022-10-19 20:07 ` hjl.tools at gmail dot com
                   ` (11 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: hjl.tools at gmail dot com @ 2022-10-19 19:49 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304

--- Comment #19 from H.J. Lu <hjl.tools at gmail dot com> ---
This seems to work:

diff --git a/gcc/expr.cc b/gcc/expr.cc
index 4c892d69249..b55736945c9 100644
--- a/gcc/expr.cc
+++ b/gcc/expr.cc
@@ -7902,6 +7902,11 @@ get_inner_reference (tree exp, poly_int64_pod *pbitsize,
         && VECTOR_TYPE_P (TREE_TYPE (field))
         && VECTOR_MODE_P (TYPE_MODE_RAW (TREE_TYPE (field))))
       mode = TYPE_MODE (TREE_TYPE (field));
+    /* Target attribute can change a vector mode to unsupported
+       on per-function basis.  */
+    else if (VECTOR_MODE_P (mode)
+        && vector_type_mode (TREE_TYPE (field)) == BLKmode)
+      mode = BLKmode;
   }
       else if (DECL_MODE (field) == BLKmode)
   blkmode_bitfield = true;

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Bug target/107304] internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake
  2022-10-18 16:03 [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake colin.king at intel dot com
                   ` (18 preceding siblings ...)
  2022-10-19 19:49 ` hjl.tools at gmail dot com
@ 2022-10-19 20:07 ` hjl.tools at gmail dot com
  2022-10-19 20:12 ` hjl.tools at gmail dot com
                   ` (10 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: hjl.tools at gmail dot com @ 2022-10-19 20:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at redhat dot com

--- Comment #20 from H.J. Lu <hjl.tools at gmail dot com> ---
This is the opposite of PR 80583.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Bug target/107304] internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake
  2022-10-18 16:03 [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake colin.king at intel dot com
                   ` (19 preceding siblings ...)
  2022-10-19 20:07 ` hjl.tools at gmail dot com
@ 2022-10-19 20:12 ` hjl.tools at gmail dot com
  2022-10-25 17:31 ` cvs-commit at gcc dot gnu.org
                   ` (9 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: hjl.tools at gmail dot com @ 2022-10-19 20:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304

--- Comment #21 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to H.J. Lu from comment #20)
> This is the opposite of PR 80583.

Like this

diff --git a/gcc/expr.cc b/gcc/expr.cc
index 4c892d69249..b4e1ec9dbe7 100644
--- a/gcc/expr.cc
+++ b/gcc/expr.cc
@@ -7898,8 +7898,7 @@ get_inner_reference (tree exp, poly_int64_pod *pbitsize,
     /* For vector fields re-check the target flags, as DECL_MODE
        could have been set with different target flags than
        the current function has.  */
-    if (mode == BLKmode
-        && VECTOR_TYPE_P (TREE_TYPE (field))
+    if (VECTOR_TYPE_P (TREE_TYPE (field))
         && VECTOR_MODE_P (TYPE_MODE_RAW (TREE_TYPE (field))))
       mode = TYPE_MODE (TREE_TYPE (field));
   }

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Bug target/107304] internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake
  2022-10-18 16:03 [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake colin.king at intel dot com
                   ` (20 preceding siblings ...)
  2022-10-19 20:12 ` hjl.tools at gmail dot com
@ 2022-10-25 17:31 ` cvs-commit at gcc dot gnu.org
  2022-10-25 17:34 ` hjl.tools at gmail dot com
                   ` (8 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-10-25 17:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304

--- Comment #22 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by H.J. Lu <hjl@gcc.gnu.org>:

https://gcc.gnu.org/g:1c64aba8cdf6509533f554ad86640f274cdbe37f

commit r13-3490-g1c64aba8cdf6509533f554ad86640f274cdbe37f
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Oct 19 12:53:35 2022 -0700

    Always use TYPE_MODE instead of DECL_MODE for vector field

    e034c5c8957 re PR target/78643 (ICE in convert_move, at expr.c:230)

    fixed the case where DECL_MODE of a vector field is BLKmode and its
    TYPE_MODE is a vector mode because of target attribute.  Remove the
    BLKmode check for the case where DECL_MODE of a vector field is a vector
    mode and its TYPE_MODE isn't a vector mode because of target attribute.

    gcc/

            PR target/107304
            * expr.cc (get_inner_reference): Always use TYPE_MODE for vector
            field with vector raw mode.

    gcc/testsuite/

            PR target/107304
            * gcc.target/i386/pr107304.c: New test.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Bug target/107304] internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake
  2022-10-18 16:03 [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake colin.king at intel dot com
                   ` (21 preceding siblings ...)
  2022-10-25 17:31 ` cvs-commit at gcc dot gnu.org
@ 2022-10-25 17:34 ` hjl.tools at gmail dot com
  2022-11-08 21:22 ` cvs-commit at gcc dot gnu.org
                   ` (7 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: hjl.tools at gmail dot com @ 2022-10-25 17:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304

--- Comment #23 from H.J. Lu <hjl.tools at gmail dot com> ---
Fixed for GCC 13 so far.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Bug target/107304] internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake
  2022-10-18 16:03 [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake colin.king at intel dot com
                   ` (22 preceding siblings ...)
  2022-10-25 17:34 ` hjl.tools at gmail dot com
@ 2022-11-08 21:22 ` cvs-commit at gcc dot gnu.org
  2022-11-08 21:56 ` cvs-commit at gcc dot gnu.org
                   ` (6 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-11-08 21:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304

--- Comment #24 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by H.J. Lu <hjl@gcc.gnu.org>:

https://gcc.gnu.org/g:0138ebcd482c71f55d74eb9fa533fbb54a4391d6

commit r12-8899-g0138ebcd482c71f55d74eb9fa533fbb54a4391d6
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Oct 19 12:53:35 2022 -0700

    Always use TYPE_MODE instead of DECL_MODE for vector field

    e034c5c8957 re PR target/78643 (ICE in convert_move, at expr.c:230)

    fixed the case where DECL_MODE of a vector field is BLKmode and its
    TYPE_MODE is a vector mode because of target attribute.  Remove the
    BLKmode check for the case where DECL_MODE of a vector field is a vector
    mode and its TYPE_MODE isn't a vector mode because of target attribute.

    gcc/

            PR target/107304
            * expr.cc (get_inner_reference): Always use TYPE_MODE for vector
            field with vector raw mode.

    gcc/testsuite/

            PR target/107304
            * gcc.target/i386/pr107304.c: New test.

    (cherry picked from commit 1c64aba8cdf6509533f554ad86640f274cdbe37f)

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Bug target/107304] internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake
  2022-10-18 16:03 [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake colin.king at intel dot com
                   ` (23 preceding siblings ...)
  2022-11-08 21:22 ` cvs-commit at gcc dot gnu.org
@ 2022-11-08 21:56 ` cvs-commit at gcc dot gnu.org
  2022-11-08 22:25 ` cvs-commit at gcc dot gnu.org
                   ` (5 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-11-08 21:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304

--- Comment #25 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by H.J. Lu <hjl@gcc.gnu.org>:

https://gcc.gnu.org/g:c97c6569c826731910459812e3608255962dab78

commit r11-10370-gc97c6569c826731910459812e3608255962dab78
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Oct 19 12:53:35 2022 -0700

    Always use TYPE_MODE instead of DECL_MODE for vector field

    e034c5c8957 re PR target/78643 (ICE in convert_move, at expr.c:230)

    fixed the case where DECL_MODE of a vector field is BLKmode and its
    TYPE_MODE is a vector mode because of target attribute.  Remove the
    BLKmode check for the case where DECL_MODE of a vector field is a vector
    mode and its TYPE_MODE isn't a vector mode because of target attribute.

    gcc/

            PR target/107304
            * expr.c (get_inner_reference): Always use TYPE_MODE for vector
            field with vector raw mode.

    gcc/testsuite/

            PR target/107304
            * gcc.target/i386/pr107304.c: New test.

    (cherry picked from commit 1c64aba8cdf6509533f554ad86640f274cdbe37f)

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Bug target/107304] internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake
  2022-10-18 16:03 [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake colin.king at intel dot com
                   ` (24 preceding siblings ...)
  2022-11-08 21:56 ` cvs-commit at gcc dot gnu.org
@ 2022-11-08 22:25 ` cvs-commit at gcc dot gnu.org
  2022-11-08 22:56 ` hjl.tools at gmail dot com
                   ` (4 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-11-08 22:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304

--- Comment #26 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by H.J. Lu <hjl@gcc.gnu.org>:

https://gcc.gnu.org/g:bb08940b30bd50c6e860bb8ac72d6f2ce7c1b25d

commit r10-11076-gbb08940b30bd50c6e860bb8ac72d6f2ce7c1b25d
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Oct 19 12:53:35 2022 -0700

    Always use TYPE_MODE instead of DECL_MODE for vector field

    e034c5c8957 re PR target/78643 (ICE in convert_move, at expr.c:230)

    fixed the case where DECL_MODE of a vector field is BLKmode and its
    TYPE_MODE is a vector mode because of target attribute.  Remove the
    BLKmode check for the case where DECL_MODE of a vector field is a vector
    mode and its TYPE_MODE isn't a vector mode because of target attribute.

    gcc/

            PR target/107304
            * expr.c (get_inner_reference): Always use TYPE_MODE for vector
            field with vector raw mode.

    gcc/testsuite/

            PR target/107304
            * gcc.target/i386/pr107304.c: New test.

    (cherry picked from commit 1c64aba8cdf6509533f554ad86640f274cdbe37f)

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Bug target/107304] internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake
  2022-10-18 16:03 [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake colin.king at intel dot com
                   ` (25 preceding siblings ...)
  2022-11-08 22:25 ` cvs-commit at gcc dot gnu.org
@ 2022-11-08 22:56 ` hjl.tools at gmail dot com
  2022-11-11 11:27 ` aoliva at gcc dot gnu.org
                   ` (3 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: hjl.tools at gmail dot com @ 2022-11-08 22:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |13.0

--- Comment #27 from H.J. Lu <hjl.tools at gmail dot com> ---
Fixed for GCC 13, 12.3, 11.4 and 10.5.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Bug target/107304] internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake
  2022-10-18 16:03 [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake colin.king at intel dot com
                   ` (26 preceding siblings ...)
  2022-11-08 22:56 ` hjl.tools at gmail dot com
@ 2022-11-11 11:27 ` aoliva at gcc dot gnu.org
  2022-11-23 13:34 ` ro at gcc dot gnu.org
                   ` (2 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: aoliva at gcc dot gnu.org @ 2022-11-11 11:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304

Alexandre Oliva <aoliva at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aoliva at gcc dot gnu.org

--- Comment #28 from Alexandre Oliva <aoliva at gcc dot gnu.org> ---
Thanks for the fix.  I'm missing something like this (untested) for x86_64-elf:

diff --git a/gcc/testsuite/gcc.target/i386/pr107304.c
b/gcc/testsuite/gcc.target/i386/pr107304.c
index 24d68795e7f1c..0043b7b21a32f 100644
--- a/gcc/testsuite/gcc.target/i386/pr107304.c
+++ b/gcc/testsuite/gcc.target/i386/pr107304.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O0 -march=tigerlake" } */
+/* { dg-require-ifunc "" } */

 #include <stdint.h>

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Bug target/107304] internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake
  2022-10-18 16:03 [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake colin.king at intel dot com
                   ` (27 preceding siblings ...)
  2022-11-11 11:27 ` aoliva at gcc dot gnu.org
@ 2022-11-23 13:34 ` ro at gcc dot gnu.org
  2022-11-30  8:00 ` cvs-commit at gcc dot gnu.org
  2022-12-19 22:52 ` pinskia at gcc dot gnu.org
  30 siblings, 0 replies; 32+ messages in thread
From: ro at gcc dot gnu.org @ 2022-11-23 13:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ro at gcc dot gnu.org

--- Comment #29 from Rainer Orth <ro at gcc dot gnu.org> ---
(In reply to Alexandre Oliva from comment #28)
> Thanks for the fix.  I'm missing something like this (untested) for
> x86_64-elf:
> 
> diff --git a/gcc/testsuite/gcc.target/i386/pr107304.c
> b/gcc/testsuite/gcc.target/i386/pr107304.c
> index 24d68795e7f1c..0043b7b21a32f 100644
> --- a/gcc/testsuite/gcc.target/i386/pr107304.c
> +++ b/gcc/testsuite/gcc.target/i386/pr107304.c
> @@ -1,5 +1,6 @@
>  /* { dg-do compile } */
>  /* { dg-options "-O0 -march=tigerlake" } */
> +/* { dg-require-ifunc "" } */
>  
>  #include <stdint.h>

I'm seeing the same on Solaris/x86.  Tested both there and on Linux/x86_64.
Ok for trunk, thanks.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Bug target/107304] internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake
  2022-10-18 16:03 [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake colin.king at intel dot com
                   ` (28 preceding siblings ...)
  2022-11-23 13:34 ` ro at gcc dot gnu.org
@ 2022-11-30  8:00 ` cvs-commit at gcc dot gnu.org
  2022-12-19 22:52 ` pinskia at gcc dot gnu.org
  30 siblings, 0 replies; 32+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-11-30  8:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304

--- Comment #30 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Alexandre Oliva <aoliva@gcc.gnu.org>:

https://gcc.gnu.org/g:a1b5cdf381d6b02f5048d886a8377d0042bda3af

commit r13-4402-ga1b5cdf381d6b02f5048d886a8377d0042bda3af
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Wed Nov 30 04:55:11 2022 -0300

    [PR107304] note test's ifunc requirement

    The test uses target_clones, that requires ifunc support.


    for  gcc/testsuite/ChangeLog

            PR target/107304
            * gcc.target/i386/pr107304.c: dg-require ifunc support.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Bug target/107304] internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake
  2022-10-18 16:03 [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake colin.king at intel dot com
                   ` (29 preceding siblings ...)
  2022-11-30  8:00 ` cvs-commit at gcc dot gnu.org
@ 2022-12-19 22:52 ` pinskia at gcc dot gnu.org
  30 siblings, 0 replies; 32+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-12-19 22:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|13.0                        |10.5
      Known to fail|                            |10.4.0, 11.3.0, 12.2.0
         Resolution|---                         |FIXED
      Known to work|                            |10.4.1, 11.3.1, 12.2.1
             Status|NEW                         |RESOLVED

--- Comment #31 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to H.J. Lu from comment #27)
> Fixed for GCC 13, 12.3, 11.4 and 10.5.

.

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2022-12-19 22:52 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-18 16:03 [Bug middle-end/107304] New: internal compiler error: in convert_move, at expr.cc:220 with -march=tigerlake colin.king at intel dot com
2022-10-18 16:06 ` [Bug middle-end/107304] " colin.king at intel dot com
2022-10-18 16:16 ` colin.king at intel dot com
2022-10-18 16:37 ` colin.king at intel dot com
2022-10-18 18:30 ` [Bug target/107304] " hjl.tools at gmail dot com
2022-10-18 23:21 ` crazylht at gmail dot com
2022-10-18 23:37 ` crazylht at gmail dot com
2022-10-18 23:44 ` hjl.tools at gmail dot com
2022-10-19  1:27 ` crazylht at gmail dot com
2022-10-19  2:41 ` hjl.tools at gmail dot com
2022-10-19  3:00 ` wwwhhhyyy333 at gmail dot com
2022-10-19  3:03 ` crazylht at gmail dot com
2022-10-19  3:11 ` hjl.tools at gmail dot com
2022-10-19  3:20 ` hjl.tools at gmail dot com
2022-10-19  3:25 ` crazylht at gmail dot com
2022-10-19  3:31 ` hjl.tools at gmail dot com
2022-10-19  3:55 ` crazylht at gmail dot com
2022-10-19 18:03 ` hjl.tools at gmail dot com
2022-10-19 18:37 ` hjl.tools at gmail dot com
2022-10-19 19:49 ` hjl.tools at gmail dot com
2022-10-19 20:07 ` hjl.tools at gmail dot com
2022-10-19 20:12 ` hjl.tools at gmail dot com
2022-10-25 17:31 ` cvs-commit at gcc dot gnu.org
2022-10-25 17:34 ` hjl.tools at gmail dot com
2022-11-08 21:22 ` cvs-commit at gcc dot gnu.org
2022-11-08 21:56 ` cvs-commit at gcc dot gnu.org
2022-11-08 22:25 ` cvs-commit at gcc dot gnu.org
2022-11-08 22:56 ` hjl.tools at gmail dot com
2022-11-11 11:27 ` aoliva at gcc dot gnu.org
2022-11-23 13:34 ` ro at gcc dot gnu.org
2022-11-30  8:00 ` cvs-commit at gcc dot gnu.org
2022-12-19 22:52 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).