public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/110371] New: gfortran ICE "verify_gimple failed" in gfortran.dg/vect/pr51058-2.f90
@ 2023-06-22 20:27 thiago.bauermann at linaro dot org
  2023-06-22 20:28 ` [Bug fortran/110371] " thiago.bauermann at linaro dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: thiago.bauermann at linaro dot org @ 2023-06-22 20:27 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110371
           Summary: gfortran ICE "verify_gimple failed" in
                    gfortran.dg/vect/pr51058-2.f90
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: thiago.bauermann at linaro dot org
  Target Milestone: ---

Created attachment 55387
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55387&action=edit
Output of running gfortran with -freport-bug

In today's trunk (tested commit 33ebb0dff9bb "configure: Implement
--enable-host-bind-now") I get these new failures on aarch64-linux-gnu:

Running gcc:gcc.target/aarch64/sve/aarch64-sve.exp ...
FAIL: gcc.target/aarch64/sve/pack_fcvt_signed_1.c scan-assembler-times
\\tfcvtzs\\tz[0-9]+\\.s, p[0-7]/m, z[0-9]+\\.d\\n 2
FAIL: gcc.target/aarch64/sve/pack_fcvt_signed_1.c scan-assembler-times
\\tuzp1\\tz[0-9]+\\.s, z[0-9]+\\.s, z[0-9]+\\.s\\n 1
FAIL: gcc.target/aarch64/sve/pack_fcvt_unsigned_1.c scan-assembler-times
\\tfcvtzu\\tz[0-9]+\\.s, p[0-7]/m, z[0-9]+\\.d\\n 2
FAIL: gcc.target/aarch64/sve/pack_fcvt_unsigned_1.c scan-assembler-times
\\tuzp1\\tz[0-9]+\\.s, z[0-9]+\\.s, z[0-9]+\\.s\\n 1
FAIL: gcc.target/aarch64/sve/unpack_fcvt_signed_1.c scan-assembler-times
\\tscvtf\\tz[0-9]+\\.d, p[0-7]/m, z[0-9]+\\.s\\n 2
FAIL: gcc.target/aarch64/sve/unpack_fcvt_signed_1.c scan-assembler-times
\\tzip1\\tz[0-9]+\\.s, z[0-9]+\\.s, z[0-9]+\\.s\\n 1
FAIL: gcc.target/aarch64/sve/unpack_fcvt_signed_1.c scan-assembler-times
\\tzip2\\tz[0-9]+\\.s, z[0-9]+\\.s, z[0-9]+\\.s\\n 1
FAIL: gcc.target/aarch64/sve/unpack_fcvt_unsigned_1.c scan-assembler-times
\\tucvtf\\tz[0-9]+\\.d, p[0-7]/m, z[0-9]+\\.s\\n 2
FAIL: gcc.target/aarch64/sve/unpack_fcvt_unsigned_1.c scan-assembler-times
\\tzip1\\tz[0-9]+\\.s, z[0-9]+\\.s, z[0-9]+\\.s\\n 1
FAIL: gcc.target/aarch64/sve/unpack_fcvt_unsigned_1.c scan-assembler-times
\\tzip2\\tz[0-9]+\\.s, z[0-9]+\\.s, z[0-9]+\\.s\\n 1
                === gfortran tests ===

Running gfortran:gfortran.dg/dg.exp ...
FAIL: gfortran.dg/pr68251.f90 -O  (internal compiler error: verify_gimple
failed)
FAIL: gfortran.dg/pr68251.f90 -O  (test for excess errors)

Running gfortran:gfortran.dg/vect/vect.exp ...
FAIL: gfortran.dg/vect/pr51058-2.f90 -O  (internal compiler error:
verify_gimple failed)
FAIL: gfortran.dg/vect/pr51058-2.f90 -O  (test for excess errors)

Looking into this failure:

FAIL: gfortran.dg/vect/pr51058-2.f90 -O  (internal compiler error:
verify_gimple failed)

The problem is:

spawn -ignore SIGHUP
/home/thiago.bauermann/.cache/builds/gcc-wt-native/gcc/testsuite/gfortran/../../gfortran
-B/home/thiago.bauermann/.cache/builds/gcc-wt-native/gcc/testsuite/gfortran/../../
-B/home/thiago.bauermann/.cache/builds/gcc-wt-native/aarch64-unknown-linux-gnu/./libgfortran/
/home/thiago.bauermann/src/gcc-wt/gcc/testsuite/gfortran.dg/vect/pr51058-2.f90
-fdiagnostics-plain-output -fdiagnostics-plain-output -O -O2 -ftree-vectorize
-fvect-cost-model=unlimited -fdump-tree-vect-details -S -o pr51058-2.s
/home/thiago.bauermann/src/gcc-wt/gcc/testsuite/gfortran.dg/vect/pr51058-2.f90:3:18:
Error: invalid types in nop conversion
real(kind=8)
integer(kind=4)
vect__53.48_312 = (vector(2) real(kind=8)) vect__54.46_306;
/home/thiago.bauermann/src/gcc-wt/gcc/testsuite/gfortran.dg/vect/pr51058-2.f90:3:18:
Error: invalid types in nop conversion
real(kind=8)
integer(kind=4)
vect__53.48_314 = (vector(2) real(kind=8)) vect__54.46_308;
during GIMPLE pass: vect
dump file: pr51058-2.f90.173t.vect
/home/thiago.bauermann/src/gcc-wt/gcc/testsuite/gfortran.dg/vect/pr51058-2.f90:3:18:
internal compiler error: verify_gimple failed
0xf5844b verify_gimple_in_cfg(function*, bool, bool)
        /home/thiago.bauermann/src/gcc-wt/gcc/tree-cfg.cc:5646
0xde3e03 execute_function_todo
        /home/thiago.bauermann/src/gcc-wt/gcc/passes.cc:2098
0xde442f execute_todo
        /home/thiago.bauermann/src/gcc-wt/gcc/passes.cc:2152
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.
compiler exited with status 1
FAIL: gfortran.dg/vect/pr51058-2.f90   -O  (internal compiler error:
verify_gimple failed)

I'm attaching the output of running with -freport-bug, and also the generated
dump file.

Our CI bisected the problem to commit 6f19cf752616 "Use intermiediate integer
type for float_expr/fix_trunc_expr when direct optab is not existed."
And indeed, if I revert that commit from trunk, all the mentioned tests pass.

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

* [Bug fortran/110371] gfortran ICE "verify_gimple failed" in gfortran.dg/vect/pr51058-2.f90
  2023-06-22 20:27 [Bug fortran/110371] New: gfortran ICE "verify_gimple failed" in gfortran.dg/vect/pr51058-2.f90 thiago.bauermann at linaro dot org
@ 2023-06-22 20:28 ` thiago.bauermann at linaro dot org
  2023-06-23  0:18 ` [Bug tree-optimization/110371] [14 Regression] gfortran ICE "verify_gimple failed" in gfortran.dg/vect/pr51058-2.f90 since r14-2007 pinskia at gcc dot gnu.org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: thiago.bauermann at linaro dot org @ 2023-06-22 20:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Thiago Jung Bauermann <thiago.bauermann at linaro dot org> ---
Created attachment 55388
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55388&action=edit
Dump file.

This is the dump file generated by the -freport-bug run from the previous
attachment.

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

* [Bug tree-optimization/110371] [14 Regression] gfortran ICE "verify_gimple failed" in gfortran.dg/vect/pr51058-2.f90 since r14-2007
  2023-06-22 20:27 [Bug fortran/110371] New: gfortran ICE "verify_gimple failed" in gfortran.dg/vect/pr51058-2.f90 thiago.bauermann at linaro dot org
  2023-06-22 20:28 ` [Bug fortran/110371] " thiago.bauermann at linaro dot org
@ 2023-06-23  0:18 ` pinskia at gcc dot gnu.org
  2023-06-23  6:03 ` sjames at gcc dot gnu.org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-23  0:18 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.0
            Summary|gfortran ICE "verify_gimple |[14 Regression] gfortran
                   |failed" in                  |ICE "verify_gimple failed"
                   |gfortran.dg/vect/pr51058-2. |in
                   |f90                         |gfortran.dg/vect/pr51058-2.
                   |                            |f90 since r14-2007
           Keywords|                            |testsuite-fail

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

* [Bug tree-optimization/110371] [14 Regression] gfortran ICE "verify_gimple failed" in gfortran.dg/vect/pr51058-2.f90 since r14-2007
  2023-06-22 20:27 [Bug fortran/110371] New: gfortran ICE "verify_gimple failed" in gfortran.dg/vect/pr51058-2.f90 thiago.bauermann at linaro dot org
  2023-06-22 20:28 ` [Bug fortran/110371] " thiago.bauermann at linaro dot org
  2023-06-23  0:18 ` [Bug tree-optimization/110371] [14 Regression] gfortran ICE "verify_gimple failed" in gfortran.dg/vect/pr51058-2.f90 since r14-2007 pinskia at gcc dot gnu.org
@ 2023-06-23  6:03 ` sjames at gcc dot gnu.org
  2023-06-23  6:17 ` rguenth at gcc dot gnu.org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-06-23  6:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Sam James <sjames at gcc dot gnu.org> ---
Created attachment 55390
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55390&action=edit
pixman-matrix.c.i

I think I've hit the same thing building pixman.

```
# gcc
/var/tmp/portage/x11-libs/pixman-0.42.2/work/pixman-0.42.2-.arm64/./pixman/libpixman-1.so.0.42.2.p/pixman-matrix.c.i
-c -O3
../pixman-0.42.2/pixman/pixman-matrix.c: In function
‘pixman_f_transform_from_pixman_transform’:
../pixman-0.42.2/pixman/pixman-matrix.c:739:1: error: invalid types in nop
conversion
double
int
vect__17.229_49 = (vector(2) double) vect__16.227_44;
../pixman-0.42.2/pixman/pixman-matrix.c:739:1: error: invalid types in nop
conversion
double
int
vect__17.229_51 = (vector(2) double) vect__16.228_46;
during GIMPLE pass: vect
../pixman-0.42.2/pixman/pixman-matrix.c:739:1: internal compiler error:
verify_gimple failed
0xaaaabd2c01f7 verify_gimple_in_cfg(function*, bool, bool)
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree-cfg.cc:5646
0xaaaabd0ec22f execute_function_todo
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/passes.cc:2098
0xaaaabd0ec91f execute_todo
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/passes.cc:2152
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
```

I can reduce it if needed, but I assume there's no point given the testsuite
already fails on it.

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

* [Bug tree-optimization/110371] [14 Regression] gfortran ICE "verify_gimple failed" in gfortran.dg/vect/pr51058-2.f90 since r14-2007
  2023-06-22 20:27 [Bug fortran/110371] New: gfortran ICE "verify_gimple failed" in gfortran.dg/vect/pr51058-2.f90 thiago.bauermann at linaro dot org
                   ` (2 preceding siblings ...)
  2023-06-23  6:03 ` sjames at gcc dot gnu.org
@ 2023-06-23  6:17 ` rguenth at gcc dot gnu.org
  2023-06-25  1:12 ` crazylht at gmail dot com
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-06-23  6:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Looks like NOP_EXPR is used instead of FLOAT_EXPR?

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

* [Bug tree-optimization/110371] [14 Regression] gfortran ICE "verify_gimple failed" in gfortran.dg/vect/pr51058-2.f90 since r14-2007
  2023-06-22 20:27 [Bug fortran/110371] New: gfortran ICE "verify_gimple failed" in gfortran.dg/vect/pr51058-2.f90 thiago.bauermann at linaro dot org
                   ` (3 preceding siblings ...)
  2023-06-23  6:17 ` rguenth at gcc dot gnu.org
@ 2023-06-25  1:12 ` crazylht at gmail dot com
  2023-06-25  2:54 ` crazylht at gmail dot com
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: crazylht at gmail dot com @ 2023-06-25  1:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Hongtao.liu <crazylht at gmail dot com> ---
I'll take a look.

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

* [Bug tree-optimization/110371] [14 Regression] gfortran ICE "verify_gimple failed" in gfortran.dg/vect/pr51058-2.f90 since r14-2007
  2023-06-22 20:27 [Bug fortran/110371] New: gfortran ICE "verify_gimple failed" in gfortran.dg/vect/pr51058-2.f90 thiago.bauermann at linaro dot org
                   ` (4 preceding siblings ...)
  2023-06-25  1:12 ` crazylht at gmail dot com
@ 2023-06-25  2:54 ` crazylht at gmail dot com
  2023-06-25  3:09 ` crazylht at gmail dot com
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: crazylht at gmail dot com @ 2023-06-25  2:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Hongtao.liu <crazylht at gmail dot com> ---
Reproduced with

typedef struct dest
{
  double m[3][3];
} dest;

typedef struct src
{
  int m[3][3];
} src;

void
foo (dest *a, src* s)
{
  for (int i = 0; i != 3; i++)
    for (int j = 0; j != 3; j++)
      a->m[i][j] = s->m[i][j];
}


for aarch64-linux-gnu.

The problem is when there's more than 1 vop in vec_oprnds0, vec_dest will be
overwrited to final vectype_out, but here it's expecting cvt_type. I'm testing
below:

Staged changes
1 file changed, 10 insertions(+), 4 deletions(-)
gcc/tree-vect-stmts.cc | 14 ++++++++++----

modified   gcc/tree-vect-stmts.cc
@@ -5044,7 +5044,7 @@ vectorizable_conversion (vec_info *vinfo,
                          gimple **vec_stmt, slp_tree slp_node,
                          stmt_vector_for_cost *cost_vec)
 {
-  tree vec_dest;
+  tree vec_dest, cvt_op;
   tree scalar_dest;
   tree op0, op1 = NULL_TREE;
   loop_vec_info loop_vinfo = dyn_cast <loop_vec_info> (vinfo);
@@ -5568,6 +5568,13 @@ vectorizable_conversion (vec_info *vinfo,
     case NONE:
       vect_get_vec_defs (vinfo, stmt_info, slp_node, ncopies,
                          op0, &vec_oprnds0);
+      /* vec_dest is intermediate type operand when multi_step_cvt.  */
+      if (multi_step_cvt)
+        {
+          cvt_op = vec_dest;
+          vec_dest = vec_dsts[0];
+        }
+
       FOR_EACH_VEC_ELT (vec_oprnds0, i, vop0)
         {
           /* Arguments are ready, create the new vector stmt.  */
@@ -5575,12 +5582,11 @@ vectorizable_conversion (vec_info *vinfo,
           if (multi_step_cvt)
             {
               gcc_assert (multi_step_cvt == 1);
-              new_stmt = vect_gimple_build (vec_dest, codecvt1, vop0);
-              new_temp = make_ssa_name (vec_dest, new_stmt);
+              new_stmt = vect_gimple_build (cvt_op, codecvt1, vop0);
+              new_temp = make_ssa_name (cvt_op, new_stmt);
               gimple_assign_set_lhs (new_stmt, new_temp);
               vect_finish_stmt_generation (vinfo, stmt_info, new_stmt, gsi);
               vop0 = new_temp;
-              vec_dest = vec_dsts[0];
             }
           new_stmt = vect_gimple_build (vec_dest, code1, vop0);
           new_temp = make_ssa_name (vec_dest, new_stmt);

[back]

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

* [Bug tree-optimization/110371] [14 Regression] gfortran ICE "verify_gimple failed" in gfortran.dg/vect/pr51058-2.f90 since r14-2007
  2023-06-22 20:27 [Bug fortran/110371] New: gfortran ICE "verify_gimple failed" in gfortran.dg/vect/pr51058-2.f90 thiago.bauermann at linaro dot org
                   ` (5 preceding siblings ...)
  2023-06-25  2:54 ` crazylht at gmail dot com
@ 2023-06-25  3:09 ` crazylht at gmail dot com
  2023-06-25  3:34 ` crazylht at gmail dot com
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: crazylht at gmail dot com @ 2023-06-25  3:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to Thiago Jung Bauermann from comment #0)
> Created attachment 55387 [details]
> Output of running gfortran with -freport-bug
> 
> In today's trunk (tested commit 33ebb0dff9bb "configure: Implement
> --enable-host-bind-now") I get these new failures on aarch64-linux-gnu:
> 
> Running gcc:gcc.target/aarch64/sve/aarch64-sve.exp ...
> FAIL: gcc.target/aarch64/sve/pack_fcvt_signed_1.c scan-assembler-times
> \\tfcvtzs\\tz[0-9]+\\.s, p[0-7]/m, z[0-9]+\\.d\\n 2
> FAIL: gcc.target/aarch64/sve/pack_fcvt_signed_1.c scan-assembler-times
> \\tuzp1\\tz[0-9]+\\.s, z[0-9]+\\.s, z[0-9]+\\.s\\n 1
> FAIL: gcc.target/aarch64/sve/pack_fcvt_unsigned_1.c scan-assembler-times
> \\tfcvtzu\\tz[0-9]+\\.s, p[0-7]/m, z[0-9]+\\.d\\n 2
> FAIL: gcc.target/aarch64/sve/pack_fcvt_unsigned_1.c scan-assembler-times
> \\tuzp1\\tz[0-9]+\\.s, z[0-9]+\\.s, z[0-9]+\\.s\\n 1
> FAIL: gcc.target/aarch64/sve/unpack_fcvt_signed_1.c scan-assembler-times
> \\tscvtf\\tz[0-9]+\\.d, p[0-7]/m, z[0-9]+\\.s\\n 2
> FAIL: gcc.target/aarch64/sve/unpack_fcvt_signed_1.c scan-assembler-times
> \\tzip1\\tz[0-9]+\\.s, z[0-9]+\\.s, z[0-9]+\\.s\\n 1
> FAIL: gcc.target/aarch64/sve/unpack_fcvt_signed_1.c scan-assembler-times
> \\tzip2\\tz[0-9]+\\.s, z[0-9]+\\.s, z[0-9]+\\.s\\n 1
> FAIL: gcc.target/aarch64/sve/unpack_fcvt_unsigned_1.c scan-assembler-times
> \\tucvtf\\tz[0-9]+\\.d, p[0-7]/m, z[0-9]+\\.s\\n 2
> FAIL: gcc.target/aarch64/sve/unpack_fcvt_unsigned_1.c scan-assembler-times
> \\tzip1\\tz[0-9]+\\.s, z[0-9]+\\.s, z[0-9]+\\.s\\n 1
> FAIL: gcc.target/aarch64/sve/unpack_fcvt_unsigned_1.c scan-assembler-times
> \\tzip2\\tz[0-9]+\\.s, z[0-9]+\\.s, z[0-9]+\\.s\\n 1
> 		=== gfortran tests ===
> 

For this scan-assembler failures, It looks like gcc now generates better code,
is it ok to adjust testcase to match new assembly?

current:
        ld1d    z31.d, p7/z, [x1, x3, lsl 3]
        fadd    z31.d, p7/m, z31.d, z30.d
        fcvtzs  z31.d, p6/m, z31.d
        st1w    z31.d, p7, [x0, x3, lsl 2]
        add     x3, x3, x4
        whilelo p7.d, w3, w2
        b.any   .L3

vs 
original
        punpklo p2.h, p0.b
        punpkhi p1.h, p0.b
        ld1d    z0.d, p2/z, [x1, x3, lsl 3]
        ld1d    z1.d, p1/z, [x5, x3, lsl 3]
        fadd    z0.d, p2/m, z0.d, z2.d
        fadd    z1.d, p1/m, z1.d, z2.d
        fcvtzs  z0.s, p3/m, z0.d
        fcvtzs  z1.s, p3/m, z1.d
        uzp1    z0.s, z0.s, z1.s
        st1w    z0.s, p0, [x0, x3, lsl 2]
        add     x3, x3, x4
        whilelo p0.s, w3, w2
        b.any   .L3


https://godbolt.org/z/b4cW7WKev

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

* [Bug tree-optimization/110371] [14 Regression] gfortran ICE "verify_gimple failed" in gfortran.dg/vect/pr51058-2.f90 since r14-2007
  2023-06-22 20:27 [Bug fortran/110371] New: gfortran ICE "verify_gimple failed" in gfortran.dg/vect/pr51058-2.f90 thiago.bauermann at linaro dot org
                   ` (6 preceding siblings ...)
  2023-06-25  3:09 ` crazylht at gmail dot com
@ 2023-06-25  3:34 ` crazylht at gmail dot com
  2023-06-26  7:30 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: crazylht at gmail dot com @ 2023-06-25  3:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to Hongtao.liu from comment #6)
> (In reply to Thiago Jung Bauermann from comment #0)
> > Created attachment 55387 [details]
> > Output of running gfortran with -freport-bug
> > 
> > In today's trunk (tested commit 33ebb0dff9bb "configure: Implement
> > --enable-host-bind-now") I get these new failures on aarch64-linux-gnu:
> > 
> > Running gcc:gcc.target/aarch64/sve/aarch64-sve.exp ...
> > FAIL: gcc.target/aarch64/sve/pack_fcvt_signed_1.c scan-assembler-times
> > \\tfcvtzs\\tz[0-9]+\\.s, p[0-7]/m, z[0-9]+\\.d\\n 2
> > FAIL: gcc.target/aarch64/sve/pack_fcvt_signed_1.c scan-assembler-times
> > \\tuzp1\\tz[0-9]+\\.s, z[0-9]+\\.s, z[0-9]+\\.s\\n 1
> > FAIL: gcc.target/aarch64/sve/pack_fcvt_unsigned_1.c scan-assembler-times
> > \\tfcvtzu\\tz[0-9]+\\.s, p[0-7]/m, z[0-9]+\\.d\\n 2
> > FAIL: gcc.target/aarch64/sve/pack_fcvt_unsigned_1.c scan-assembler-times
> > \\tuzp1\\tz[0-9]+\\.s, z[0-9]+\\.s, z[0-9]+\\.s\\n 1
> > FAIL: gcc.target/aarch64/sve/unpack_fcvt_signed_1.c scan-assembler-times
> > \\tscvtf\\tz[0-9]+\\.d, p[0-7]/m, z[0-9]+\\.s\\n 2
> > FAIL: gcc.target/aarch64/sve/unpack_fcvt_signed_1.c scan-assembler-times
> > \\tzip1\\tz[0-9]+\\.s, z[0-9]+\\.s, z[0-9]+\\.s\\n 1
> > FAIL: gcc.target/aarch64/sve/unpack_fcvt_signed_1.c scan-assembler-times
> > \\tzip2\\tz[0-9]+\\.s, z[0-9]+\\.s, z[0-9]+\\.s\\n 1
> > FAIL: gcc.target/aarch64/sve/unpack_fcvt_unsigned_1.c scan-assembler-times
> > \\tucvtf\\tz[0-9]+\\.d, p[0-7]/m, z[0-9]+\\.s\\n 2
> > FAIL: gcc.target/aarch64/sve/unpack_fcvt_unsigned_1.c scan-assembler-times
> > \\tzip1\\tz[0-9]+\\.s, z[0-9]+\\.s, z[0-9]+\\.s\\n 1
> > FAIL: gcc.target/aarch64/sve/unpack_fcvt_unsigned_1.c scan-assembler-times
> > \\tzip2\\tz[0-9]+\\.s, z[0-9]+\\.s, z[0-9]+\\.s\\n 1
> > 		=== gfortran tests ===
> > 
> 
> For this scan-assembler failures, It looks like gcc now generates better
> code, is it ok to adjust testcase to match new assembly?
> 
> current:
>         ld1d    z31.d, p7/z, [x1, x3, lsl 3]
>         fadd    z31.d, p7/m, z31.d, z30.d
>         fcvtzs  z31.d, p6/m, z31.d
>         st1w    z31.d, p7, [x0, x3, lsl 2]
>         add     x3, x3, x4
>         whilelo p7.d, w3, w2
>         b.any   .L3
> 
> vs 
> original
>         punpklo p2.h, p0.b
>         punpkhi p1.h, p0.b
>         ld1d    z0.d, p2/z, [x1, x3, lsl 3]
>         ld1d    z1.d, p1/z, [x5, x3, lsl 3]
>         fadd    z0.d, p2/m, z0.d, z2.d
>         fadd    z1.d, p1/m, z1.d, z2.d
>         fcvtzs  z0.s, p3/m, z0.d
>         fcvtzs  z1.s, p3/m, z1.d
>         uzp1    z0.s, z0.s, z1.s
>         st1w    z0.s, p0, [x0, x3, lsl 2]
>         add     x3, x3, x4
>         whilelo p0.s, w3, w2
>         b.any   .L3
> 
> 
> https://godbolt.org/z/b4cW7WKev

Or only adjust testcase for FLOAT_EXPR, not for FIX_TRUNC_EXPR to avoid float-
integer overflow.

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

* [Bug tree-optimization/110371] [14 Regression] gfortran ICE "verify_gimple failed" in gfortran.dg/vect/pr51058-2.f90 since r14-2007
  2023-06-22 20:27 [Bug fortran/110371] New: gfortran ICE "verify_gimple failed" in gfortran.dg/vect/pr51058-2.f90 thiago.bauermann at linaro dot org
                   ` (7 preceding siblings ...)
  2023-06-25  3:34 ` crazylht at gmail dot com
@ 2023-06-26  7:30 ` cvs-commit at gcc dot gnu.org
  2023-06-26  7:49 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-06-26  7:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 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:77a50c772771f681085922b493922516c3c03e9a

commit r14-2085-g77a50c772771f681085922b493922516c3c03e9a
Author: liuhongt <hongtao.liu@intel.com>
Date:   Sun Jun 25 11:35:09 2023 +0800

    Don't use intermiediate type for FIX_TRUNC_EXPR when ftrapping-math.

    > > Hmm, good question.  GENERIC has a direct truncation to unsigned char
    > > for example, the C standard generally says if the integral part cannot
    > > be represented then the behavior is undefined.  So I think we should be
    > > safe here (0x1.0p32 doesn't fit an int).
    >
    > We should be following Annex F (unspecified value plus "invalid"
exception
    > for out-of-range floating-to-integer conversions rather than undefined
    > behavior).  But we don't achieve that very well at present (see bug 93806
    > comments 27-29 for examples of how such conversions produce wobbly
    > values).

    That would mean guarding this with !flag_trapping_math would be the
appropriate
    thing to do.

    gcc/ChangeLog:

            PR tree-optimization/110371
            PR tree-optimization/110018
            * tree-vect-stmts.cc (vectorizable_conversion): Don't use
            intermiediate type for FIX_TRUNC_EXPR when ftrapping-math.

    gcc/testsuite/ChangeLog:

            * gcc.target/i386/pr110018-1.c: Add -fno-trapping-math to
dg-options.
            * gcc.target/i386/pr110018-2.c: Ditto.

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

* [Bug tree-optimization/110371] [14 Regression] gfortran ICE "verify_gimple failed" in gfortran.dg/vect/pr51058-2.f90 since r14-2007
  2023-06-22 20:27 [Bug fortran/110371] New: gfortran ICE "verify_gimple failed" in gfortran.dg/vect/pr51058-2.f90 thiago.bauermann at linaro dot org
                   ` (8 preceding siblings ...)
  2023-06-26  7:30 ` cvs-commit at gcc dot gnu.org
@ 2023-06-26  7:49 ` cvs-commit at gcc dot gnu.org
  2023-06-26 10:21 ` thiago.bauermann at linaro dot org
  2023-06-26 18:42 ` tschwinge at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-06-26  7:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 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:1bfe7e5352d1f4ac525317454aca45aa80a517ba

commit r14-2086-g1bfe7e5352d1f4ac525317454aca45aa80a517ba
Author: liuhongt <hongtao.liu@intel.com>
Date:   Sun Jun 25 11:12:29 2023 +0800

    Use cvt_op to save intermediate type operand instead of "subtle" vec_dest.

    When there're multiple operands in vec_oprnds0, vec_dest will be
    overwrited to vectype_out, but in multi_step_cvt case, cvt_type is
    expected. It caused an ICE when verify_gimple_in_cfg.

    gcc/ChangeLog:

            PR tree-optimization/110371
            PR tree-optimization/110018
            * tree-vect-stmts.cc (vectorizable_conversion): Use cvt_op to
            save intermediate type operand instead of "subtle" vec_dest
            for case NONE.

    gcc/testsuite/ChangeLog:

            * gcc.target/aarch64/pr110371.c: New test.

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

* [Bug tree-optimization/110371] [14 Regression] gfortran ICE "verify_gimple failed" in gfortran.dg/vect/pr51058-2.f90 since r14-2007
  2023-06-22 20:27 [Bug fortran/110371] New: gfortran ICE "verify_gimple failed" in gfortran.dg/vect/pr51058-2.f90 thiago.bauermann at linaro dot org
                   ` (9 preceding siblings ...)
  2023-06-26  7:49 ` cvs-commit at gcc dot gnu.org
@ 2023-06-26 10:21 ` thiago.bauermann at linaro dot org
  2023-06-26 18:42 ` tschwinge at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: thiago.bauermann at linaro dot org @ 2023-06-26 10:21 UTC (permalink / raw)
  To: gcc-bugs

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

Thiago Jung Bauermann <thiago.bauermann at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #10 from Thiago Jung Bauermann <thiago.bauermann at linaro dot org> ---
Your commit fixed the gfortran failures I reported, thank you!

The aarch64-sve.exp failures are still there, but it's a separate issue.

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

* [Bug tree-optimization/110371] [14 Regression] gfortran ICE "verify_gimple failed" in gfortran.dg/vect/pr51058-2.f90 since r14-2007
  2023-06-22 20:27 [Bug fortran/110371] New: gfortran ICE "verify_gimple failed" in gfortran.dg/vect/pr51058-2.f90 thiago.bauermann at linaro dot org
                   ` (10 preceding siblings ...)
  2023-06-26 10:21 ` thiago.bauermann at linaro dot org
@ 2023-06-26 18:42 ` tschwinge at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2023-06-26 18:42 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Schwinge <tschwinge at gcc dot gnu.org> changed:

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

--- Comment #11 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
*** Bug 110412 has been marked as a duplicate of this bug. ***

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

end of thread, other threads:[~2023-06-26 18:42 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-22 20:27 [Bug fortran/110371] New: gfortran ICE "verify_gimple failed" in gfortran.dg/vect/pr51058-2.f90 thiago.bauermann at linaro dot org
2023-06-22 20:28 ` [Bug fortran/110371] " thiago.bauermann at linaro dot org
2023-06-23  0:18 ` [Bug tree-optimization/110371] [14 Regression] gfortran ICE "verify_gimple failed" in gfortran.dg/vect/pr51058-2.f90 since r14-2007 pinskia at gcc dot gnu.org
2023-06-23  6:03 ` sjames at gcc dot gnu.org
2023-06-23  6:17 ` rguenth at gcc dot gnu.org
2023-06-25  1:12 ` crazylht at gmail dot com
2023-06-25  2:54 ` crazylht at gmail dot com
2023-06-25  3:09 ` crazylht at gmail dot com
2023-06-25  3:34 ` crazylht at gmail dot com
2023-06-26  7:30 ` cvs-commit at gcc dot gnu.org
2023-06-26  7:49 ` cvs-commit at gcc dot gnu.org
2023-06-26 10:21 ` thiago.bauermann at linaro dot org
2023-06-26 18:42 ` tschwinge 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).