public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/104511] New: [10/11/12 Regression] ICE: in emit_move_insn, at expr.cc:4010 with __builtin_convertvector() at -O
@ 2022-02-12  8:05 zsojka at seznam dot cz
  2022-02-14  8:53 ` [Bug target/104511] " rguenth at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: zsojka at seznam dot cz @ 2022-02-12  8:05 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104511
           Summary: [10/11/12 Regression] ICE: in emit_move_insn, at
                    expr.cc:4010 with __builtin_convertvector() at -O
           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: powerpc64le-unknown-linux-gnu

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

Compiler output:
$ powerpc64le-unknown-linux-gnu-gcc -O testcase.c -Wno-psabi
during RTL pass: expand
testcase.c: In function 'foo':
testcase.c:9:5: internal compiler error: in emit_move_insn, at expr.cc:4010
    9 |   D d = __builtin_convertvector (f, D);
      |     ^
0x64498b emit_move_insn(rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/expr.cc:4010
0xa9421a expand_gimple_stmt_1
        /repo/gcc-trunk/gcc/cfgexpand.cc:3994
0xa9421a expand_gimple_stmt
        /repo/gcc-trunk/gcc/cfgexpand.cc:4028
0xa99da8 expand_gimple_basic_block
        /repo/gcc-trunk/gcc/cfgexpand.cc:6069
0xa9c0b7 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.


$ powerpc64le-unknown-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-powerpc64le/bin/powerpc64le-unknown-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r12-7195-20220211112825-g72f8d228aff-checking-yes-rtl-df-extra-powerpc64le/bin/../libexec/gcc/powerpc64le-unknown-linux-gnu/12.0.1/lto-wrapper
Target: powerpc64le-unknown-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
--with-sysroot=/usr/powerpc64le-unknown-linux-gnu --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=powerpc64le-unknown-linux-gnu
--with-ld=/usr/bin/powerpc64le-unknown-linux-gnu-ld
--with-as=/usr/bin/powerpc64le-unknown-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r12-7195-20220211112825-g72f8d228aff-checking-yes-rtl-df-extra-powerpc64le
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.1 20220211 (experimental) (GCC)

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

* [Bug target/104511] [10/11/12 Regression] ICE: in emit_move_insn, at expr.cc:4010 with __builtin_convertvector() at -O
  2022-02-12  8:05 [Bug target/104511] New: [10/11/12 Regression] ICE: in emit_move_insn, at expr.cc:4010 with __builtin_convertvector() at -O zsojka at seznam dot cz
@ 2022-02-14  8:53 ` rguenth at gcc dot gnu.org
  2022-02-14 10:26 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-02-14  8:53 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2022-02-14
   Target Milestone|---                         |10.4
     Ever confirmed|0                           |1
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
vector lowering produces

  _5 = BIT_FIELD_REF <f_1(D), 64, 0>;
  _6 = (_Decimal32) _5;
  _7 = BIT_FIELD_REF <f_1(D), 64, 64>;
  _8 = (_Decimal32) _7;
  _9 = BIT_FIELD_REF <f_1(D), 64, 128>;
  _10 = (_Decimal32) _9;
  _11 = BIT_FIELD_REF <f_1(D), 64, 192>;
  _12 = (_Decimal32) _11;
  d_2 = {_6, _8, _10, _12};

where the BIT_FIELD_REFs extract _Float64.  Then forwprop matches the
CTOR as VEC_PACK_TRUNC_EXPR from vector(2) _Float64 to vetor(4) _Decimal32.

  _13 = BIT_FIELD_REF <f_1(D), 128, 0>;
  _14 = BIT_FIELD_REF <f_1(D), 128, 128>;
  d_2 = VEC_PACK_TRUNC_EXPR <_13, _14>;

I'm not sure if decimal FP vectors are a thing on powerpc64le and what their
ABI are.  Maybe the testcase should be rejected.

Clearly the forwprop code is wrong here, since the vec_pack_trunc optab
has just a single mode there's no way to convert between DFP and FP.

I'll fix that, not sure if that will fix everything.

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

* [Bug target/104511] [10/11/12 Regression] ICE: in emit_move_insn, at expr.cc:4010 with __builtin_convertvector() at -O
  2022-02-12  8:05 [Bug target/104511] New: [10/11/12 Regression] ICE: in emit_move_insn, at expr.cc:4010 with __builtin_convertvector() at -O zsojka at seznam dot cz
  2022-02-14  8:53 ` [Bug target/104511] " rguenth at gcc dot gnu.org
@ 2022-02-14 10:26 ` cvs-commit at gcc dot gnu.org
  2022-02-14 10:26 ` [Bug target/104511] [10/11 " rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-14 10:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

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

commit r12-7224-gf320197c8b495324dc6997a99d53e7f45ecf5840
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Feb 14 10:09:10 2022 +0100

    tree-optimization/104511 - avoid FP to DFP conversion for VEC_PACK_TRUNC

    This avoids forwprop from matching DFP <-> FP vector conversions
    using VEC_[UN]PACK{_TRUNC,_LO,_HI}.  Maybe DFP vectors shouldn't be
    a thing, but they appearantly are.  Re-using CONVERT/NOP_EXPR for
    DFP <-> FP conversions was probably a mistake.

    2022-02-14  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/104511
            * tree-ssa-forwprop.cc (simplify_vector_constructor): Avoid
            touching DFP <-> FP conversions.

            * gcc.dg/pr104511.c: New testcase.

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

* [Bug target/104511] [10/11 Regression] ICE: in emit_move_insn, at expr.cc:4010 with __builtin_convertvector() at -O
  2022-02-12  8:05 [Bug target/104511] New: [10/11/12 Regression] ICE: in emit_move_insn, at expr.cc:4010 with __builtin_convertvector() at -O zsojka at seznam dot cz
  2022-02-14  8:53 ` [Bug target/104511] " rguenth at gcc dot gnu.org
  2022-02-14 10:26 ` cvs-commit at gcc dot gnu.org
@ 2022-02-14 10:26 ` rguenth at gcc dot gnu.org
  2022-03-16  8:22 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-02-14 10:26 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |12.0
           Priority|P3                          |P2
            Summary|[10/11/12 Regression] ICE:  |[10/11 Regression] ICE: in
                   |in emit_move_insn, at       |emit_move_insn, at
                   |expr.cc:4010 with           |expr.cc:4010 with
                   |__builtin_convertvector()   |__builtin_convertvector()
                   |at -O                       |at -O

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

* [Bug target/104511] [10/11 Regression] ICE: in emit_move_insn, at expr.cc:4010 with __builtin_convertvector() at -O
  2022-02-12  8:05 [Bug target/104511] New: [10/11/12 Regression] ICE: in emit_move_insn, at expr.cc:4010 with __builtin_convertvector() at -O zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2022-02-14 10:26 ` [Bug target/104511] [10/11 " rguenth at gcc dot gnu.org
@ 2022-03-16  8:22 ` cvs-commit at gcc dot gnu.org
  2022-03-16  9:22 ` [Bug target/104511] [10 " cvs-commit at gcc dot gnu.org
  2022-03-16  9:24 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-03-16  8:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:

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

commit r11-9660-gd261855943584e25c43fc59dfbc75e50e24a66b8
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Feb 14 10:09:10 2022 +0100

    tree-optimization/104511 - avoid FP to DFP conversion for VEC_PACK_TRUNC

    This avoids forwprop from matching DFP <-> FP vector conversions
    using VEC_[UN]PACK{_TRUNC,_LO,_HI}.  Maybe DFP vectors shouldn't be
    a thing, but they appearantly are.  Re-using CONVERT/NOP_EXPR for
    DFP <-> FP conversions was probably a mistake.

    2022-02-14  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/104511
            * tree-ssa-forwprop.c (simplify_vector_constructor): Avoid
            touching DFP <-> FP conversions.

            * gcc.dg/pr104511.c: New testcase.

    (cherry picked from commit f320197c8b495324dc6997a99d53e7f45ecf5840)

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

* [Bug target/104511] [10 Regression] ICE: in emit_move_insn, at expr.cc:4010 with __builtin_convertvector() at -O
  2022-02-12  8:05 [Bug target/104511] New: [10/11/12 Regression] ICE: in emit_move_insn, at expr.cc:4010 with __builtin_convertvector() at -O zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2022-03-16  8:22 ` cvs-commit at gcc dot gnu.org
@ 2022-03-16  9:22 ` cvs-commit at gcc dot gnu.org
  2022-03-16  9:24 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-03-16  9:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:2cd7683cdbccf5d3fce58aa279e77c8baa48e4bd

commit r10-10500-g2cd7683cdbccf5d3fce58aa279e77c8baa48e4bd
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Feb 14 10:09:10 2022 +0100

    tree-optimization/104511 - avoid FP to DFP conversion for VEC_PACK_TRUNC

    This avoids forwprop from matching DFP <-> FP vector conversions
    using VEC_[UN]PACK{_TRUNC,_LO,_HI}.  Maybe DFP vectors shouldn't be
    a thing, but they appearantly are.  Re-using CONVERT/NOP_EXPR for
    DFP <-> FP conversions was probably a mistake.

    2022-02-14  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/104511
            * tree-ssa-forwprop.c (simplify_vector_constructor): Avoid
            touching DFP <-> FP conversions.

            * gcc.dg/pr104511.c: New testcase.

    (cherry picked from commit f320197c8b495324dc6997a99d53e7f45ecf5840)

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

* [Bug target/104511] [10 Regression] ICE: in emit_move_insn, at expr.cc:4010 with __builtin_convertvector() at -O
  2022-02-12  8:05 [Bug target/104511] New: [10/11/12 Regression] ICE: in emit_move_insn, at expr.cc:4010 with __builtin_convertvector() at -O zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2022-03-16  9:22 ` [Bug target/104511] [10 " cvs-commit at gcc dot gnu.org
@ 2022-03-16  9:24 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-03-16  9:24 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |10.3.1
      Known to fail|10.3.1                      |10.3.0
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2022-03-16  9:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-12  8:05 [Bug target/104511] New: [10/11/12 Regression] ICE: in emit_move_insn, at expr.cc:4010 with __builtin_convertvector() at -O zsojka at seznam dot cz
2022-02-14  8:53 ` [Bug target/104511] " rguenth at gcc dot gnu.org
2022-02-14 10:26 ` cvs-commit at gcc dot gnu.org
2022-02-14 10:26 ` [Bug target/104511] [10/11 " rguenth at gcc dot gnu.org
2022-03-16  8:22 ` cvs-commit at gcc dot gnu.org
2022-03-16  9:22 ` [Bug target/104511] [10 " cvs-commit at gcc dot gnu.org
2022-03-16  9:24 ` rguenth 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).