* [Bug target/104666] [12 Regression] ICE in related_vector_mode, at stor-layout.c:537
2022-02-23 17:57 [Bug c/104666] New: [12 Regression] ICE in related_vector_mode, at stor-layout.c:537 gscfq@t-online.de
@ 2022-02-24 1:29 ` crazylht at gmail dot com
2022-02-24 3:02 ` crazylht at gmail dot com
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: crazylht at gmail dot com @ 2022-02-24 1:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104666
Hongtao.liu <crazylht at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |crazylht at gmail dot com
--- Comment #1 from Hongtao.liu <crazylht at gmail dot com> ---
Probably caused by my r12-1834
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/104666] [12 Regression] ICE in related_vector_mode, at stor-layout.c:537
2022-02-23 17:57 [Bug c/104666] New: [12 Regression] ICE in related_vector_mode, at stor-layout.c:537 gscfq@t-online.de
2022-02-24 1:29 ` [Bug target/104666] " crazylht at gmail dot com
@ 2022-02-24 3:02 ` crazylht at gmail dot com
2022-02-24 6:49 ` crazylht at gmail dot com
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: crazylht at gmail dot com @ 2022-02-24 3:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104666
--- Comment #2 from Hongtao.liu <crazylht at gmail dot com> ---
So builtins are registered in the beginning, but isa checking is during
pass_expand, and gimple folding is between them, maybe we should restrict
builtin gimple folding under their required target.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/104666] [12 Regression] ICE in related_vector_mode, at stor-layout.c:537
2022-02-23 17:57 [Bug c/104666] New: [12 Regression] ICE in related_vector_mode, at stor-layout.c:537 gscfq@t-online.de
2022-02-24 1:29 ` [Bug target/104666] " crazylht at gmail dot com
2022-02-24 3:02 ` crazylht at gmail dot com
@ 2022-02-24 6:49 ` crazylht at gmail dot com
2022-02-24 6:50 ` crazylht at gmail dot com
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: crazylht at gmail dot com @ 2022-02-24 6:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104666
--- Comment #3 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to Hongtao.liu from comment #2)
> So builtins are registered in the beginning, but isa checking is during
> pass_expand, and gimple folding is between them, maybe we should restrict
> builtin gimple folding under their required target.
I'm testing this.
+ /* Avoid ICE in get_same_size_vectype which assumes real vector
+ mode, and it depends on vector_mode_supported_p, E_BLKmode
+ means target isa mismatch. */
+ if (TYPE_MODE (type) == E_BLKmode)
+ break;
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/104666] [12 Regression] ICE in related_vector_mode, at stor-layout.c:537
2022-02-23 17:57 [Bug c/104666] New: [12 Regression] ICE in related_vector_mode, at stor-layout.c:537 gscfq@t-online.de
` (2 preceding siblings ...)
2022-02-24 6:49 ` crazylht at gmail dot com
@ 2022-02-24 6:50 ` crazylht at gmail dot com
2022-02-24 9:34 ` jakub at gcc dot gnu.org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: crazylht at gmail dot com @ 2022-02-24 6:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104666
--- Comment #4 from Hongtao.liu <crazylht at gmail dot com> ---
Same ICE exists for
__builtin_ia32_blendvpd
__builtin_ia32_blendvps
__builtin_ia32_blendvpd256
__builtin_ia32_blendvps256
__builtin_ia32_pblendvb128
__builtin_ia32_pblenddvb256
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/104666] [12 Regression] ICE in related_vector_mode, at stor-layout.c:537
2022-02-23 17:57 [Bug c/104666] New: [12 Regression] ICE in related_vector_mode, at stor-layout.c:537 gscfq@t-online.de
` (3 preceding siblings ...)
2022-02-24 6:50 ` crazylht at gmail dot com
@ 2022-02-24 9:34 ` jakub at gcc dot gnu.org
2022-02-24 9:58 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-02-24 9:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104666
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Wouldn't the right fix be instead to move the ix86_expand_builtin
HOST_WIDE_INT isa = ix86_isa_flags;
HOST_WIDE_INT isa2 = ix86_isa_flags2;
HOST_WIDE_INT bisa = ix86_builtins_isa[fcode].isa;
HOST_WIDE_INT bisa2 = ix86_builtins_isa[fcode].isa2;
...
if ((bisa & OPTION_MASK_ISA_MMX) && !TARGET_MMX && TARGET_MMX_WITH_SSE
/* __builtin_ia32_maskmovq requires MMX registers. */
&& fcode != IX86_BUILTIN_MASKMOVQ)
{
bisa &= ~OPTION_MASK_ISA_MMX;
bisa |= OPTION_MASK_ISA_SSE2;
}
if ((bisa & isa) != bisa || (bisa2 & isa2) != bisa2)
code into a helper function and simply return early in
ix86_fold_builtin and ix86_gimple_fold_builtin if there is a mismatch (so
effectively keep those md builtins as calls for the cases of mismatch and
during expansion diagnose it?
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/104666] [12 Regression] ICE in related_vector_mode, at stor-layout.c:537
2022-02-23 17:57 [Bug c/104666] New: [12 Regression] ICE in related_vector_mode, at stor-layout.c:537 gscfq@t-online.de
` (4 preceding siblings ...)
2022-02-24 9:34 ` jakub at gcc dot gnu.org
@ 2022-02-24 9:58 ` rguenth at gcc dot gnu.org
2022-02-25 1:13 ` crazylht at gmail dot com
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-02-24 9:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104666
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/104666] [12 Regression] ICE in related_vector_mode, at stor-layout.c:537
2022-02-23 17:57 [Bug c/104666] New: [12 Regression] ICE in related_vector_mode, at stor-layout.c:537 gscfq@t-online.de
` (5 preceding siblings ...)
2022-02-24 9:58 ` rguenth at gcc dot gnu.org
@ 2022-02-25 1:13 ` crazylht at gmail dot com
2022-03-09 13:01 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: crazylht at gmail dot com @ 2022-02-25 1:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104666
--- Comment #6 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to Jakub Jelinek from comment #5)
> Wouldn't the right fix be instead to move the ix86_expand_builtin
Good idea!
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/104666] [12 Regression] ICE in related_vector_mode, at stor-layout.c:537
2022-02-23 17:57 [Bug c/104666] New: [12 Regression] ICE in related_vector_mode, at stor-layout.c:537 gscfq@t-online.de
` (6 preceding siblings ...)
2022-02-25 1:13 ` crazylht at gmail dot com
@ 2022-03-09 13:01 ` rguenth at gcc dot gnu.org
2022-03-14 1:22 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-03-09 13:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104666
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2022-03-09
Priority|P3 |P1
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/104666] [12 Regression] ICE in related_vector_mode, at stor-layout.c:537
2022-02-23 17:57 [Bug c/104666] New: [12 Regression] ICE in related_vector_mode, at stor-layout.c:537 gscfq@t-online.de
` (7 preceding siblings ...)
2022-03-09 13:01 ` rguenth at gcc dot gnu.org
@ 2022-03-14 1:22 ` cvs-commit at gcc dot gnu.org
2022-03-14 1:23 ` crazylht at gmail dot com
2022-03-15 13:09 ` jakub at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-03-14 1:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104666
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by hongtao Liu <liuhongt@gcc.gnu.org>:
https://gcc.gnu.org/g:823b3b79cd2b137f1023742ee1ba93e8712cef0a
commit r12-7638-g823b3b79cd2b137f1023742ee1ba93e8712cef0a
Author: liuhongt <hongtao.liu@intel.com>
Date: Thu Feb 24 14:42:14 2022 +0800
Don't fold builtin into gimple when isa mismatches.
The patch fixes ICE in ix86_gimple_fold_builtin.
gcc/ChangeLog:
PR target/104666
* config/i386/i386-expand.cc
(ix86_check_builtin_isa_match): New func.
(ix86_expand_builtin): Move code to
ix86_check_builtin_isa_match and call it.
* config/i386/i386-protos.h
(ix86_check_builtin_isa_match): Declare.
* config/i386/i386.cc (ix86_gimple_fold_builtin): Don't fold
builtin into gimple when isa mismatches.
gcc/testsuite/ChangeLog:
* gcc.target/i386/pr104666.c: New test.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/104666] [12 Regression] ICE in related_vector_mode, at stor-layout.c:537
2022-02-23 17:57 [Bug c/104666] New: [12 Regression] ICE in related_vector_mode, at stor-layout.c:537 gscfq@t-online.de
` (8 preceding siblings ...)
2022-03-14 1:22 ` cvs-commit at gcc dot gnu.org
@ 2022-03-14 1:23 ` crazylht at gmail dot com
2022-03-15 13:09 ` jakub at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: crazylht at gmail dot com @ 2022-03-14 1:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104666
--- Comment #8 from Hongtao.liu <crazylht at gmail dot com> ---
Fixed in GCC12.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/104666] [12 Regression] ICE in related_vector_mode, at stor-layout.c:537
2022-02-23 17:57 [Bug c/104666] New: [12 Regression] ICE in related_vector_mode, at stor-layout.c:537 gscfq@t-online.de
` (9 preceding siblings ...)
2022-03-14 1:23 ` crazylht at gmail dot com
@ 2022-03-15 13:09 ` jakub at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-03-15 13:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104666
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
.
^ permalink raw reply [flat|nested] 12+ messages in thread