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

            Bug ID: 101462
           Summary: [12 regression] ICE on aarch64 after r12-2292
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: clyon at gcc dot gnu.org
  Target Milestone: ---

After r12-2292 we have an ICE on aarch64:
FAIL: gcc.dg/vect/pr92324-4.c (test for excess errors)
Excess errors:
/home/christophe.lyon/src/GCC/sources/gcc-fsf-git/trunk/gcc/testsuite/gcc.dg/vect/pr92324-4.c:7:1:
error: incompatible types in 'PHI' argument 1
vector(2) unsigned int
vector(2) int
_91 = PHI <_90(17), _83(11)>
during GIMPLE pass: vect
dump file: ./pr92324-4.c.167t.vect
/home/christophe.lyon/src/GCC/sources/gcc-fsf-git/trunk/gcc/testsuite/gcc.dg/vect/pr92324-4.c:7:1:
internal compiler error: verify_gimple failed
0x142fe6f verify_gimple_in_cfg(function*, bool)
       
/home/christophe.lyon/src/GCC/sources/gcc-fsf-git/trunk/gcc/tree-cfg.c:5536
0x12701fa execute_function_todo
       
/home/christophe.lyon/src/GCC/sources/gcc-fsf-git/trunk/gcc/passes.c:2042
0x126f132 do_per_function
       
/home/christophe.lyon/src/GCC/sources/gcc-fsf-git/trunk/gcc/passes.c:1687
0x12703ee execute_todo
       
/home/christophe.lyon/src/GCC/sources/gcc-fsf-git/trunk/gcc/passes.c:2096


gcc is configured --target=aarch64-none-linux-gnu

cc1 is invoked with:
cc1 -fpreprocessed ./pr92324-4.i -quiet -dumpdir ./ -dumpbase pr92324-4.c
-dumpbase-ext .c -mlittle-endian -mabi=lp64 -O2 -version
-fdiagnostics-color=never -fno-diagnostics-show-caret
-fno-diagnostics-show-line-numbers -fdiagnostics-urls=never
-fdiagnostics-path-format=separate-events -flto -ffat-lto-objects
-ftree-vectorize -fno-tree-loop-distribute-patterns -fvect-cost-model=unlimited
-fno-common -fdump-tree-vect-details -o ./pr92324-4.s


There is another regression which does not ICE:
FAIL: gcc.target/aarch64/vect-fmaxv-fminv-compile.c scan-assembler fminnmv
FAIL: gcc.target/aarch64/vect-fmaxv-fminv-compile.c scan-assembler fmaxnmv

Before the patch:
maxv_f32:                                                                       
.LFB0:                                                                          
        .cfi_startproc                                                          
        ldr     q1, [x0, 4]                                                     
        ld1r    {v3.4s}, [x0]                                                   
        ldr     d0, [x0, 20]                                                    
        ldr     s2, [x0, 28]                                                    
        fmaxnm  v1.4s, v1.4s, v3.4s                                             
        fmaxnmv s1, v1.4s                                                       
        dup     v1.2s, v1.s[0]                                                  
        fmaxnm  v0.2s, v0.2s, v1.2s                                             
        fmaxnmp s0, v0.2s                                                       
        fmaxnm  s0, s2, s0                                                      
        ret                                                                     

After the patch:
maxv_f32:                                                                       
.LFB0:                                                                          
        .cfi_startproc                                                          
        ldr     q1, [x0, 4]                                                     
        ld1r    {v3.4s}, [x0]                                                   
        ldr     d2, [x0, 20]                                                    
        ldr     s0, [x0, 28]                                                    
        fmaxnm  v1.4s, v1.4s, v3.4s                                             
        dup     d3, v1.d[1]                                                     
        fmaxnm  v1.2s, v1.2s, v3.2s                                             
        fmaxnm  v1.2s, v1.2s, v2.2s                                             
        fmaxnmp s1, v1.2s                                                       
        fmaxnm  s0, s0, s1                                                      
        ret

Reply via email to