* [Bug target/61925] [4.8/4.9/5.0 Regression] internal error when using vectorization on CPU without SSE
2014-07-26 22:18 [Bug c/61925] New: internal error when using vectorization on CPU without SSE mikulas at artax dot karlin.mff.cuni.cz
@ 2014-07-27 9:49 ` mpolacek at gcc dot gnu.org
2014-07-27 13:59 ` mpolacek at gcc dot gnu.org
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-07-27 9:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61925
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-07-27
CC| |mpolacek at gcc dot gnu.org
Target Milestone|--- |4.8.4
Summary|internal error when using |[4.8/4.9/5.0 Regression]
|vectorization on CPU |internal error when using
|without SSE |vectorization on CPU
| |without SSE
Ever confirmed|0 |1
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed. Happens since 4.6.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/61925] [4.8/4.9/5.0 Regression] internal error when using vectorization on CPU without SSE
2014-07-26 22:18 [Bug c/61925] New: internal error when using vectorization on CPU without SSE mikulas at artax dot karlin.mff.cuni.cz
2014-07-27 9:49 ` [Bug target/61925] [4.8/4.9/5.0 Regression] " mpolacek at gcc dot gnu.org
@ 2014-07-27 13:59 ` mpolacek at gcc dot gnu.org
2014-11-24 13:02 ` [Bug target/61925] [4.8/4.9/5 " rguenth at gcc dot gnu.org
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-07-27 13:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61925
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with r162918.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/61925] [4.8/4.9/5 Regression] internal error when using vectorization on CPU without SSE
2014-07-26 22:18 [Bug c/61925] New: internal error when using vectorization on CPU without SSE mikulas at artax dot karlin.mff.cuni.cz
2014-07-27 9:49 ` [Bug target/61925] [4.8/4.9/5.0 Regression] " mpolacek at gcc dot gnu.org
2014-07-27 13:59 ` mpolacek at gcc dot gnu.org
@ 2014-11-24 13:02 ` rguenth at gcc dot gnu.org
2014-11-25 10:14 ` rguenth at gcc dot gnu.org
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-11-24 13:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61925
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
I will have a look.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/61925] [4.8/4.9/5 Regression] internal error when using vectorization on CPU without SSE
2014-07-26 22:18 [Bug c/61925] New: internal error when using vectorization on CPU without SSE mikulas at artax dot karlin.mff.cuni.cz
` (2 preceding siblings ...)
2014-11-24 13:02 ` [Bug target/61925] [4.8/4.9/5 " rguenth at gcc dot gnu.org
@ 2014-11-25 10:14 ` rguenth at gcc dot gnu.org
2014-12-19 13:31 ` jakub at gcc dot gnu.org
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-11-25 10:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61925
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
On trunk I get
vector.c:6:1: error: unrecognizable insn:
(insn 3 2 4 2 (set (reg/v:TI 101 [ a ])
(mem/c:TI (plus:SI (reg/f:SI 81 virtual-incoming-args)
(const_int 16 [0x10])) [1 a+0 S16 A128])) vector.c:4 -1
(expr_list:REG_EQUIV (mem/c:TI (plus:SI (reg/f:SI 81
virtual-incoming-args)
(const_int 16 [0x10])) [1 a+0 S16 A128])
(nil)))
instead.
Reduced testcase for the convert_move ICE on the branches, ICEs at -m32
-march=i386:
#pragma GCC push_options
#pragma GCC target("sse")
typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__));
typedef long long __m128i __attribute__ ((__vector_size__ (16),
__may_alias__));
__m128i _mm_castps_si128(__m128 __A) { }
#pragma GCC pop_options
__attribute__((vector_size(16))) int
f(__attribute__((vector_size(16))) int a,
__attribute__((vector_size(16))) int b)
{
return a + b;
}
this seems to be fixed on trunk.
Reduced testcase for the ICE on trunk, ICEs at -m32 -march=i386:
#pragma GCC push_options
#pragma GCC target("sse")
typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__));
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__,
__artificial__)) _mm_undefined_ps (void) {
}
#pragma GCC target("sse2")
#pragma GCC pop_options
__attribute__((vector_size(16))) int f(__attribute__((vector_size(16))) int a,
__attribute__((vector_size(16))) int b) {
return a + b;
}
thus it requires a sse2 target attribute.
Would be interesting to know what fixed the convert_move ICE on trunk.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/61925] [4.8/4.9/5 Regression] internal error when using vectorization on CPU without SSE
2014-07-26 22:18 [Bug c/61925] New: internal error when using vectorization on CPU without SSE mikulas at artax dot karlin.mff.cuni.cz
` (3 preceding siblings ...)
2014-11-25 10:14 ` rguenth at gcc dot gnu.org
@ 2014-12-19 13:31 ` jakub at gcc dot gnu.org
2015-01-28 8:28 ` jakub at gcc dot gnu.org
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-12-19 13:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61925
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.8.4 |4.8.5
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.8.4 has been released.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/61925] [4.8/4.9/5 Regression] internal error when using vectorization on CPU without SSE
2014-07-26 22:18 [Bug c/61925] New: internal error when using vectorization on CPU without SSE mikulas at artax dot karlin.mff.cuni.cz
` (4 preceding siblings ...)
2014-12-19 13:31 ` jakub at gcc dot gnu.org
@ 2015-01-28 8:28 ` jakub at gcc dot gnu.org
2015-01-28 12:24 ` jakub at gcc dot gnu.org
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-01-28 8:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61925
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu.org
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The first testcase in #c4 got fixed with r217633.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/61925] [4.8/4.9/5 Regression] internal error when using vectorization on CPU without SSE
2014-07-26 22:18 [Bug c/61925] New: internal error when using vectorization on CPU without SSE mikulas at artax dot karlin.mff.cuni.cz
` (5 preceding siblings ...)
2015-01-28 8:28 ` jakub at gcc dot gnu.org
@ 2015-01-28 12:24 ` jakub at gcc dot gnu.org
2015-01-28 14:48 ` jakub at gcc dot gnu.org
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-01-28 12:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61925
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So, it seems this is a complete mess.
The reason why we ICE is that the target pragma support is broken.
The main issue I see is that ix86_reset_to_default_globals doesn't actually
reset to defaults (== target_option_default_node), but to the current target
pragma (== target_option_current_node), and that even only if
ix86_previous_fndecl was previously non-NULL and had non-NULL target specific
option. And then ix86_set_current_function for some strange reason special
cases the defaults (i.e. NULL or == target_option_default_node), both for the
old and new, rather than the current target pragma (==
target_option_current_node). So, the important question is, is there any
reason
why in between functions the target options (both in global_options and target
globals) should be set to something other than the defaults (==
target_option_default_node)? I mean, it is hard to guess in what state it is
anyway, as ix86_set_current_function when going to NULL will keep it at the
latest state, so say __attribute__((target (avx2))) function definition in
a #pragma GCC target ("avx") region will keep it in avx2 state afterwards
anyway.
Also, I wonder about the start of
ix86_pragma_target_parse, shouldn't prev_tree be set to
target_option_current_node rather than whatever happens to be in global_options
at that point?
Or is keeping global_options to match the current active target pragma needed
for say vector type modes? If yes, then we should arrange for
target_option_current_node != target_option_default_node case that whenever we
ix86_set_current_function to NULL, we also restore global_options to that.
And there is another thing - I've noticed nested
ix86_valid_target_attribute_tree calls, the thing is when we are in pragma
target, decl_attributes call this function again, and that happens even when
calling ix86_add_new_builtins from this function. I wonder if we shouldn't
temporarily clear current_target_pragma, I think the target builtin decls don't
really need that and if pragma GCC target isn't used (but target attribute
instead), it isn't done anyway.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/61925] [4.8/4.9/5 Regression] internal error when using vectorization on CPU without SSE
2014-07-26 22:18 [Bug c/61925] New: internal error when using vectorization on CPU without SSE mikulas at artax dot karlin.mff.cuni.cz
` (6 preceding siblings ...)
2015-01-28 12:24 ` jakub at gcc dot gnu.org
@ 2015-01-28 14:48 ` jakub at gcc dot gnu.org
2015-02-11 10:04 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-01-28 14:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61925
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|rguenth at gcc dot gnu.org |jakub at gcc dot gnu.org
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 34608
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34608&action=edit
gcc5-pr61925.patch
Untested fix that keeps the current #pragma GCC target options in
global_options if outside of functions. Passed make check-gcc \
RUNTESTFLAGS='--target_board=unix\{-m32,-m64\} i386.exp'
so far.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/61925] [4.8/4.9/5 Regression] internal error when using vectorization on CPU without SSE
2014-07-26 22:18 [Bug c/61925] New: internal error when using vectorization on CPU without SSE mikulas at artax dot karlin.mff.cuni.cz
` (7 preceding siblings ...)
2015-01-28 14:48 ` jakub at gcc dot gnu.org
@ 2015-02-11 10:04 ` jakub at gcc dot gnu.org
2015-02-11 10:15 ` [Bug target/61925] [4.8/4.9 " jakub at gcc dot gnu.org
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-02-11 10:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61925
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Feb 11 10:04:14 2015
New Revision: 220609
URL: https://gcc.gnu.org/viewcvs?rev=220609&root=gcc&view=rev
Log:
PR target/61925
* config/i386/i386.c (ix86_reset_to_default_globals): Removed.
(ix86_reset_previous_fndecl): Restore it here, unconditionally.
(ix86_set_current_function): Rewritten.
(ix86_add_new_builtins): Temporarily clear current_target_pragma
when creating builtin fndecls.
* gcc.target/i386/pr61925-1.c: New test.
* gcc.target/i386/pr61925-2.c: New test.
* gcc.target/i386/pr61925-3.c: New test.
Added:
trunk/gcc/testsuite/gcc.target/i386/pr61925-1.c
trunk/gcc/testsuite/gcc.target/i386/pr61925-2.c
trunk/gcc/testsuite/gcc.target/i386/pr61925-3.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/61925] [4.8/4.9 Regression] internal error when using vectorization on CPU without SSE
2014-07-26 22:18 [Bug c/61925] New: internal error when using vectorization on CPU without SSE mikulas at artax dot karlin.mff.cuni.cz
` (8 preceding siblings ...)
2015-02-11 10:04 ` jakub at gcc dot gnu.org
@ 2015-02-11 10:15 ` jakub at gcc dot gnu.org
2015-06-23 8:24 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-02-11 10:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61925
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.8/4.9/5 Regression] |[4.8/4.9 Regression]
|internal error when using |internal error when using
|vectorization on CPU |vectorization on CPU
|without SSE |without SSE
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed on the trunk so far.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/61925] [4.8/4.9 Regression] internal error when using vectorization on CPU without SSE
2014-07-26 22:18 [Bug c/61925] New: internal error when using vectorization on CPU without SSE mikulas at artax dot karlin.mff.cuni.cz
` (9 preceding siblings ...)
2015-02-11 10:15 ` [Bug target/61925] [4.8/4.9 " jakub at gcc dot gnu.org
@ 2015-06-23 8:24 ` rguenth at gcc dot gnu.org
2015-06-26 20:00 ` [Bug target/61925] [4.9 " jakub at gcc dot gnu.org
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-06-23 8:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61925
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.8.5 |4.9.3
--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
The gcc-4_8-branch is being closed, re-targeting regressions to 4.9.3.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/61925] [4.9 Regression] internal error when using vectorization on CPU without SSE
2014-07-26 22:18 [Bug c/61925] New: internal error when using vectorization on CPU without SSE mikulas at artax dot karlin.mff.cuni.cz
` (10 preceding siblings ...)
2015-06-23 8:24 ` rguenth at gcc dot gnu.org
@ 2015-06-26 20:00 ` jakub at gcc dot gnu.org
2015-06-26 20:30 ` jakub at gcc dot gnu.org
2021-08-13 21:41 ` pinskia at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-06-26 20:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61925
--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.9.3 has been released.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/61925] [4.9 Regression] internal error when using vectorization on CPU without SSE
2014-07-26 22:18 [Bug c/61925] New: internal error when using vectorization on CPU without SSE mikulas at artax dot karlin.mff.cuni.cz
` (11 preceding siblings ...)
2015-06-26 20:00 ` [Bug target/61925] [4.9 " jakub at gcc dot gnu.org
@ 2015-06-26 20:30 ` jakub at gcc dot gnu.org
2021-08-13 21:41 ` pinskia at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-06-26 20:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61925
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.9.3 |4.9.4
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/61925] [4.9 Regression] internal error when using vectorization on CPU without SSE
2014-07-26 22:18 [Bug c/61925] New: internal error when using vectorization on CPU without SSE mikulas at artax dot karlin.mff.cuni.cz
` (12 preceding siblings ...)
2015-06-26 20:30 ` jakub at gcc dot gnu.org
@ 2021-08-13 21:41 ` pinskia at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-13 21:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61925
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |zsojka at seznam dot cz
--- Comment #14 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 59683 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 15+ messages in thread