public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/104451] New: ICE: in emit_move_insn, at expr.cc:4010 with -O -mxop -mavx512f
@ 2022-02-08 20:28 zsojka at seznam dot cz
  2022-02-08 23:06 ` [Bug target/104451] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: zsojka at seznam dot cz @ 2022-02-08 20:28 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104451
           Summary: ICE: in emit_move_insn, at expr.cc:4010 with -O -mxop
                    -mavx512f
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu

Created attachment 52380
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52380&action=edit
reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-gcc -O -mxop -mavx512f testcase.c 
during RTL pass: expand
testcase.c: In function 'foo':
testcase.c:7:12: internal compiler error: in emit_move_insn, at expr.cc:4010
    7 |   return v << c;
      |          ~~^~~~
0x6ca000 emit_move_insn(rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/expr.cc:4010
0xf7c505 force_reg(machine_mode, rtx_def*)
        /repo/gcc-trunk/gcc/explow.cc:688
0x17a8aba ix86_vector_duplicate_value
        /repo/gcc-trunk/gcc/config/i386/i386-expand.cc:14768
0x17d00f2 ix86_expand_vector_init(bool, rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/config/i386/i386-expand.cc:15888
0x1e76e71 gen_vec_initv64qiqi(rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/config/i386/sse.md:25960
0x1e76e71 gen_ashlv16qi3(rtx_def*, rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/config/i386/sse.md:24160
0x1240ffe expand_binop_directly
        /repo/gcc-trunk/gcc/optabs.cc:1442
0x123ea21 expand_binop(machine_mode, optab_tag, rtx_def*, rtx_def*, rtx_def*,
int, optab_methods)
        /repo/gcc-trunk/gcc/optabs.cc:1529
0xf81954 expand_shift_1
        /repo/gcc-trunk/gcc/expmed.cc:2661
0xf89083 expand_variable_shift(tree_code, machine_mode, rtx_def*, tree_node*,
rtx_def*, int)
        /repo/gcc-trunk/gcc/expmed.cc:2713
0xf9c3bd expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
        /repo/gcc-trunk/gcc/expr.cc:9931
0xfa2ce7 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /repo/gcc-trunk/gcc/expr.cc:10504
0xe6709c expand_expr
        /repo/gcc-trunk/gcc/expr.h:301
0xe6709c expand_return
        /repo/gcc-trunk/gcc/cfgexpand.cc:3793
0xe6709c expand_gimple_stmt_1
        /repo/gcc-trunk/gcc/cfgexpand.cc:3902
0xe6709c expand_gimple_stmt
        /repo/gcc-trunk/gcc/cfgexpand.cc:4028
0xe6cd8e expand_gimple_basic_block
        /repo/gcc-trunk/gcc/cfgexpand.cc:6069
0xe6e987 execute
        /repo/gcc-trunk/gcc/cfgexpand.cc:6795
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.

$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r12-7089-20220208123931-g0103c2e4082-checking-yes-rtl-df-extra-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/12.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--with-cloog --with-ppl --with-isl --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
--with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r12-7089-20220208123931-g0103c2e4082-checking-yes-rtl-df-extra-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.1 20220208 (experimental) (GCC)

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

* [Bug target/104451] [9/10/11/12 Regression] ICE: in emit_move_insn, at expr.cc:4010 with -O -mxop -mavx512f
  2022-02-08 20:28 [Bug target/104451] New: ICE: in emit_move_insn, at expr.cc:4010 with -O -mxop -mavx512f zsojka at seznam dot cz
@ 2022-02-08 23:06 ` pinskia at gcc dot gnu.org
  2022-02-09  4:49 ` crazylht at gmail dot com
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-02-08 23:06 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |needs-bisection
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-02-08
            Summary|ICE: in emit_move_insn, at  |[9/10/11/12 Regression]
                   |expr.cc:4010 with -O -mxop  |ICE: in emit_move_insn, at
                   |-mavx512f                   |expr.cc:4010 with -O -mxop
                   |                            |-mavx512f
             Status|UNCONFIRMED                 |NEW
   Target Milestone|---                         |9.5
      Known to work|                            |4.9.0, 4.9.4

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.

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

* [Bug target/104451] [9/10/11/12 Regression] ICE: in emit_move_insn, at expr.cc:4010 with -O -mxop -mavx512f
  2022-02-08 20:28 [Bug target/104451] New: ICE: in emit_move_insn, at expr.cc:4010 with -O -mxop -mavx512f zsojka at seznam dot cz
  2022-02-08 23:06 ` [Bug target/104451] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
@ 2022-02-09  4:49 ` crazylht at gmail dot com
  2022-02-09  5:12 ` crazylht at gmail dot com
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: crazylht at gmail dot com @ 2022-02-09  4:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Hongtao.liu <crazylht at gmail dot com> ---
-mavx512f is not necessary, PR can be produced by -mxop -O -mavx2

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

* [Bug target/104451] [9/10/11/12 Regression] ICE: in emit_move_insn, at expr.cc:4010 with -O -mxop -mavx512f
  2022-02-08 20:28 [Bug target/104451] New: ICE: in emit_move_insn, at expr.cc:4010 with -O -mxop -mavx512f zsojka at seznam dot cz
  2022-02-08 23:06 ` [Bug target/104451] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
  2022-02-09  4:49 ` crazylht at gmail dot com
@ 2022-02-09  5:12 ` crazylht at gmail dot com
  2022-02-09  7:41 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: crazylht at gmail dot com @ 2022-02-09  5:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Hongtao.liu <crazylht at gmail dot com> ---
ix86_expand_vector_init expects vals to be a parallel containing values of
individual fields which should be either element mode of the vector mode, or a
vector mode with the same element mode and smaller number of elements.
But in the expander ashlv16qi3, the second operand is SImode which can't be
directly passed to gen_vec_initv16qiqi.

I'm testing

1 file changed, 2 insertions(+), 1 deletion(-)
gcc/config/i386/sse.md | 3 ++-

modified   gcc/config/i386/sse.md
@@ -24153,8 +24153,9 @@ (define_expand "<insn><mode>3"
            negate = true;
        }
       par = gen_rtx_PARALLEL (V16QImode, rtvec_alloc (16));
+      tmp = lowpart_subreg (QImode, operands[2], SImode);
       for (i = 0; i < 16; i++)
-        XVECEXP (par, 0, i) = operands[2];
+        XVECEXP (par, 0, i) = tmp;

       tmp = gen_reg_rtx (V16QImode);
       emit_insn (gen_vec_initv16qiqi (tmp, par));

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

* [Bug target/104451] [9/10/11/12 Regression] ICE: in emit_move_insn, at expr.cc:4010 with -O -mxop -mavx512f
  2022-02-08 20:28 [Bug target/104451] New: ICE: in emit_move_insn, at expr.cc:4010 with -O -mxop -mavx512f zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2022-02-09  5:12 ` crazylht at gmail dot com
@ 2022-02-09  7:41 ` rguenth at gcc dot gnu.org
  2022-02-09  9:15 ` cvs-commit at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-02-09  7:41 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2

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

* [Bug target/104451] [9/10/11/12 Regression] ICE: in emit_move_insn, at expr.cc:4010 with -O -mxop -mavx512f
  2022-02-08 20:28 [Bug target/104451] New: ICE: in emit_move_insn, at expr.cc:4010 with -O -mxop -mavx512f zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2022-02-09  7:41 ` rguenth at gcc dot gnu.org
@ 2022-02-09  9:15 ` cvs-commit at gcc dot gnu.org
  2022-02-09  9:59 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-09  9:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 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:59b31f0e2d187ebdb3d399661e22b28e4ebd8099

commit r12-7124-g59b31f0e2d187ebdb3d399661e22b28e4ebd8099
Author: liuhongt <hongtao.liu@intel.com>
Date:   Wed Feb 9 13:14:43 2022 +0800

    ICE: QImode(not SImode) operand should be passed to gen_vec_initv16qiqi in
ashlv16qi3.

    ix86_expand_vector_init expects vals to be a parallel containing
    values of individual fields which should be either element mode of the
    vector mode, or a vector mode with the same element mode and smaller
    number of elements.

    But in the expander ashlv16qi3, the second operand is SImode which
    can't be directly passed to gen_vec_initv16qiqi.

    gcc/ChangeLog:

            PR target/104451
            * config/i386/sse.md (<insn><mode>3): lowpart_subreg
            operands[2] from SImode to QImode.

    gcc/testsuite/ChangeLog:

            PR target/104451
            * gcc.target/i386/pr104451.c: New test.

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

* [Bug target/104451] [9/10/11/12 Regression] ICE: in emit_move_insn, at expr.cc:4010 with -O -mxop -mavx512f
  2022-02-08 20:28 [Bug target/104451] New: ICE: in emit_move_insn, at expr.cc:4010 with -O -mxop -mavx512f zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2022-02-09  9:15 ` cvs-commit at gcc dot gnu.org
@ 2022-02-09  9:59 ` cvs-commit at gcc dot gnu.org
  2022-02-09 10:00 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-09  9:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by hongtao Liu
<liuhongt@gcc.gnu.org>:

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

commit r9-9944-gc4bcb6320d0ff881e0f6ee7f24b35ea67a61d38c
Author: liuhongt <hongtao.liu@intel.com>
Date:   Wed Feb 9 13:14:43 2022 +0800

    ICE: QImode(not SImode) operand should be passed to gen_vec_initv16qiqi in
ashlv16qi3.

    ix86_expand_vector_init expects vals to be a parallel containing
    values of individual fields which should be either element mode of the
    vector mode, or a vector mode with the same element mode and smaller
    number of elements.

    But in the expander ashlv16qi3, the second operand is SImode which
    can't be directly passed to gen_vec_initv16qiqi.

    gcc/ChangeLog:

            PR target/104451
            * config/i386/sse.md (<insn><mode>3): lowpart_subreg
            operands[2] from SImode to QImode.

    gcc/testsuite/ChangeLog:

            PR target/104451
            * gcc.target/i386/pr104451.c: New test.

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

* [Bug target/104451] [9/10/11/12 Regression] ICE: in emit_move_insn, at expr.cc:4010 with -O -mxop -mavx512f
  2022-02-08 20:28 [Bug target/104451] New: ICE: in emit_move_insn, at expr.cc:4010 with -O -mxop -mavx512f zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  2022-02-09  9:59 ` cvs-commit at gcc dot gnu.org
@ 2022-02-09 10:00 ` cvs-commit at gcc dot gnu.org
  2022-02-09 10:00 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-09 10:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by hongtao Liu
<liuhongt@gcc.gnu.org>:

https://gcc.gnu.org/g:0ceeec139d2e181bbeab389deaf53c118a507e68

commit r10-10443-g0ceeec139d2e181bbeab389deaf53c118a507e68
Author: liuhongt <hongtao.liu@intel.com>
Date:   Wed Feb 9 13:14:43 2022 +0800

    ICE: QImode(not SImode) operand should be passed to gen_vec_initv16qiqi in
ashlv16qi3.

    ix86_expand_vector_init expects vals to be a parallel containing
    values of individual fields which should be either element mode of the
    vector mode, or a vector mode with the same element mode and smaller
    number of elements.

    But in the expander ashlv16qi3, the second operand is SImode which
    can't be directly passed to gen_vec_initv16qiqi.

    gcc/ChangeLog:

            PR target/104451
            * config/i386/sse.md (<insn><mode>3): lowpart_subreg
            operands[2] from SImode to QImode.

    gcc/testsuite/ChangeLog:

            PR target/104451
            * gcc.target/i386/pr104451.c: New test.

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

* [Bug target/104451] [9/10/11/12 Regression] ICE: in emit_move_insn, at expr.cc:4010 with -O -mxop -mavx512f
  2022-02-08 20:28 [Bug target/104451] New: ICE: in emit_move_insn, at expr.cc:4010 with -O -mxop -mavx512f zsojka at seznam dot cz
                   ` (6 preceding siblings ...)
  2022-02-09 10:00 ` cvs-commit at gcc dot gnu.org
@ 2022-02-09 10:00 ` cvs-commit at gcc dot gnu.org
  2022-02-09 10:01 ` crazylht at gmail dot com
  2022-02-10  0:07 ` pinskia at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-09 10:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by hongtao Liu
<liuhongt@gcc.gnu.org>:

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

commit r11-9546-gec01f11091ad54aeeea343647847c85b090c60d7
Author: liuhongt <hongtao.liu@intel.com>
Date:   Wed Feb 9 13:14:43 2022 +0800

    ICE: QImode(not SImode) operand should be passed to gen_vec_initv16qiqi in
ashlv16qi3.

    ix86_expand_vector_init expects vals to be a parallel containing
    values of individual fields which should be either element mode of the
    vector mode, or a vector mode with the same element mode and smaller
    number of elements.

    But in the expander ashlv16qi3, the second operand is SImode which
    can't be directly passed to gen_vec_initv16qiqi.

    gcc/ChangeLog:

            PR target/104451
            * config/i386/sse.md (<insn><mode>3): lowpart_subreg
            operands[2] from SImode to QImode.

    gcc/testsuite/ChangeLog:

            PR target/104451
            * gcc.target/i386/pr104451.c: New test.

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

* [Bug target/104451] [9/10/11/12 Regression] ICE: in emit_move_insn, at expr.cc:4010 with -O -mxop -mavx512f
  2022-02-08 20:28 [Bug target/104451] New: ICE: in emit_move_insn, at expr.cc:4010 with -O -mxop -mavx512f zsojka at seznam dot cz
                   ` (7 preceding siblings ...)
  2022-02-09 10:00 ` cvs-commit at gcc dot gnu.org
@ 2022-02-09 10:01 ` crazylht at gmail dot com
  2022-02-10  0:07 ` pinskia at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: crazylht at gmail dot com @ 2022-02-09 10:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Hongtao.liu <crazylht at gmail dot com> ---
Fixed in GCC12, GCC11.3, GCC10.4, GCC9.5.

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

* [Bug target/104451] [9/10/11/12 Regression] ICE: in emit_move_insn, at expr.cc:4010 with -O -mxop -mavx512f
  2022-02-08 20:28 [Bug target/104451] New: ICE: in emit_move_insn, at expr.cc:4010 with -O -mxop -mavx512f zsojka at seznam dot cz
                   ` (8 preceding siblings ...)
  2022-02-09 10:01 ` crazylht at gmail dot com
@ 2022-02-10  0:07 ` pinskia at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-02-10  0:07 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |10.3.1, 11.2.1, 12.0, 9.4.1
             Status|NEW                         |RESOLVED
      Known to fail|10.3.1, 11.2.1, 12.0, 9.4.1 |
         Resolution|---                         |FIXED

--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
.

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

end of thread, other threads:[~2022-02-10  0:07 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-08 20:28 [Bug target/104451] New: ICE: in emit_move_insn, at expr.cc:4010 with -O -mxop -mavx512f zsojka at seznam dot cz
2022-02-08 23:06 ` [Bug target/104451] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
2022-02-09  4:49 ` crazylht at gmail dot com
2022-02-09  5:12 ` crazylht at gmail dot com
2022-02-09  7:41 ` rguenth at gcc dot gnu.org
2022-02-09  9:15 ` cvs-commit at gcc dot gnu.org
2022-02-09  9:59 ` cvs-commit at gcc dot gnu.org
2022-02-09 10:00 ` cvs-commit at gcc dot gnu.org
2022-02-09 10:00 ` cvs-commit at gcc dot gnu.org
2022-02-09 10:01 ` crazylht at gmail dot com
2022-02-10  0:07 ` 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).