Bug 95633 - [11 regression] ICEs since r11-1143-gb05d5563f4be13b4a0d0951375a82adf483973c0
Summary: [11 regression] ICEs since r11-1143-gb05d5563f4be13b4a0d0951375a82adf483973c0
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 11.0
: P3 normal
Target Milestone: 11.0
Assignee: Richard Biener
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-11 07:12 UTC by Christophe Lyon
Modified: 2020-06-12 13:45 UTC (History)
1 user (show)

See Also:
Host:
Target: arm aarch64
Build:
Known to work:
Known to fail:
Last reconfirmed: 2020-06-11 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christophe Lyon 2020-06-11 07:12:52 UTC
Hi,

I've noticed regressions since r11-1143-gb05d5563f4be13b4a0d0951375a82adf483973c0:

on aarch64:
FAIL: gcc.target/aarch64/sve/clastb_5.c -march=armv8.2-a+sve (internal compiler error)
FAIL: gcc.target/aarch64/sve/clastb_5.c -march=armv8.2-a+sve (test for excess errors)
Excess errors:
during GIMPLE pass: vect
dump file: clastb_5.c.163t.vect
/gcc/testsuite/gcc.target/aarch64/sve/clastb_2.c:15:1: internal compiler error: in operator[], at vec.h:867
0x649e5a vec<tree_node*, va_heap, vl_embed>::operator[](unsigned int)
        /gcc/vec.h:867
0x649e5a vec<tree_node*, va_heap, vl_ptr>::operator[](unsigned int)
        /gcc/vec.h:1433
0x104773d vec<tree_node*, va_heap, vl_ptr>::operator[](unsigned int)
        /gcc/vec.h:998
0x104773d vectorizable_condition
        /gcc/tree-vect-stmts.c:9986
0x105df8e vect_transform_stmt(vec_info*, _stmt_vec_info*, gimple_stmt_iterator*, _slp_tree*, _slp_instance*)
        /gcc/tree-vect-stmts.c:10735
0x1060fa7 vect_transform_loop_stmt
        /gcc/tree-vect-loop.c:8310
0x1078f61 vect_transform_loop(_loop_vec_info*, gimple*)
        /gcc/tree-vect-loop.c:8711
0x109eccc try_vectorize_loop_1
        /gcc/tree-vectorizer.c:991
0x109f7a9 vectorize_loops()
        /gcc/tree-vectorizer.c:1128




on arm-none-linux-gnueabihf --with-cpu cortex-a9 --with-fpu neon-fp1:
FAIL: gcc.dg/pr86179.c (internal compiler error)
FAIL: gcc.dg/pr86179.c (test for excess errors)
Excess errors:
during GIMPLE pass: vect
/gcc/testsuite/gcc.dg/pr86179.c:7:6: internal compiler error: in operator[], at vec.h:867
0xfba61e vec<tree_node*, va_heap, vl_embed>::operator[](unsigned int)
        /gcc/vec.h:867
0xfba61e vec<tree_node*, va_heap, vl_ptr>::operator[](unsigned int)
        /gcc/vec.h:1433
0xfba61e vect_create_vectorized_promotion_stmts
        /gcc/tree-vect-stmts.c:4466
0xfba61e vectorizable_conversion
        /gcc/tree-vect-stmts.c:4934
0xfd9906 vect_transform_stmt(vec_info*, _stmt_vec_info*, gimple_stmt_iterator*, _slp_tree*, _slp_instance*)
        /gcc/tree-vect-stmts.c:10680
0x100912d vect_schedule_slp_instance
        /gcc/tree-vect-slp.c:4052
0x100900f vect_schedule_slp_instance
        /gcc/tree-vect-slp.c:3953
0x100900f vect_schedule_slp_instance
        /gcc/tree-vect-slp.c:3953
0x100900f vect_schedule_slp_instance
        /gcc/tree-vect-slp.c:3953
0x100900f vect_schedule_slp_instance
        /gcc/tree-vect-slp.c:3953
0x100900f vect_schedule_slp_instance
        /gcc/tree-vect-slp.c:3953
0x1010774 vect_schedule_slp(vec_info*)
        /gcc/tree-vect-slp.c:4167
0xff34d2 vect_transform_loop(_loop_vec_info*, gimple*)
        /gcc/tree-vect-loop.c:8623
0x10188aa try_vectorize_loop_1
        /gcc/tree-vectorizer.c:991
0x1019349 vectorize_loops()
        /gcc/tree-vectorizer.c:1128
Comment 1 Richard Biener 2020-06-12 07:17:50 UTC
I will have a look.
Comment 2 Richard Biener 2020-06-12 10:00:11 UTC
The first one is EXTRACT_LAST_REDUCTION where the ICE is fixed with the following
which looks like a simple omission in the causing patch.

diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index cdd6f6c5e5d..cf2d979fea1 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -9925,7 +9925,8 @@ vectorizable_condition (vec_info *vinfo,
   FOR_EACH_VEC_ELT (vec_oprnds0, i, vec_cond_lhs)
     {
       vec_then_clause = vec_oprnds2[i];
-      vec_else_clause = vec_oprnds3[i];
+      if (reduction_type != EXTRACT_LAST_REDUCTION)
+       vec_else_clause = vec_oprnds3[i];
 
       if (swap_cond_operands)
        std::swap (vec_then_clause, vec_else_clause);
Comment 3 Richard Biener 2020-06-12 10:06:39 UTC
I cannot reproduce the arm failure, neon-fp1 doesn't seem to exist and any
combo of -mcpu=cortex-a9 and -mfpu=... does not ICE for me.
Comment 4 GCC Commits 2020-06-12 10:09:08 UTC
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:135a8ad3a59972ea64b1244b0e221cdded9a6ec6

commit r11-1282-g135a8ad3a59972ea64b1244b0e221cdded9a6ec6
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Jun 12 12:06:53 2020 +0200

    fix vectorizable_condition ICE with EXTRACT_LAST_REDUCTION
    
    The previous reorg missed a guard around the else clause access.
    
    2020-06-12  Richard Biener  <rguenther@suse.de>
    
            PR tree-optimization/95633
            * tree-vect-stmts.c (vectorizable_condition): Properly
            guard the vec_else_clause access with EXTRACT_LAST_REDUCTION.
Comment 5 Richard Biener 2020-06-12 10:09:39 UTC
Fixed from my POV.  Cannot reproduce the other FAIL.
Comment 6 Christophe Lyon 2020-06-12 13:28:16 UTC
(In reply to Richard Biener from comment #3)
> I cannot reproduce the arm failure, neon-fp1 doesn't seem to exist and any
> combo of -mcpu=cortex-a9 and -mfpu=... does not ICE for me.

Sorry, that was a cut & paste error: did you try neon-fp16 ?
Comment 7 rguenther@suse.de 2020-06-12 13:45:46 UTC
On June 12, 2020 3:28:16 PM GMT+02:00, "clyon at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> wrote:
>https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95633
>
>--- Comment #6 from Christophe Lyon <clyon at gcc dot gnu.org> ---
>(In reply to Richard Biener from comment #3)
>> I cannot reproduce the arm failure, neon-fp1 doesn't seem to exist
>and any
>> combo of -mcpu=cortex-a9 and -mfpu=... does not ICE for me.
>
>Sorry, that was a cut & paste error: did you try neon-fp16 ?

Yes, I tried all that were listed as valid input for -mfpu.