https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68379
Bug ID: 68379 Summary: [6 Regression] BB vectorization: definition in block 13 follows the use for SSA_NAME Product: gcc Version: 6.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- Target: aarch64 ! { dg-do compile } ! { dg-additional-options "-Ofast" } ! { dg-additional-options "-mavx" { target x86_64-*-* i?86-*-* } } SUBROUTINE PASSB4 (IDO,L1,CC,CH,WA1,WA2,WA3) IMPLICIT REAL(4) (A-H, O-Z) DIMENSION CC(IDO,4,L1) ,CH(IDO,L1,4) ,& WA1(*) ,WA2(*) ,WA3(*) 102 DO 104 K=1,L1 DO 103 I=2,IDO,2 TI1 = CC(I,1,K)-CC(I,3,K) TI2 = CC(I,1,K)+CC(I,3,K) TI3 = CC(I,2,K)+CC(I,4,K) TR2 = CC(I-1,1,K)+CC(I-1,3,K) TI4 = CC(I-1,2,K)-CC(I-1,4,K) TR3 = CC(I-1,2,K)+CC(I-1,4,K) CH(I-1,K,1) = TR2+TR3 CH(I,K,1) = TI2+TI3 CI4 = TI1-TI4 CH(I-1,K,4) = CI4 CH(I,K,4) = CI4 103 CONTINUE 104 CONTINUE RETURN END on aarch64-linux ICEs with vect-9.f90:5:0: SUBROUTINE PASSB4 (IDO,L1,CC,CH,WA1,WA2,WA3) Error: definition in block 11 follows the use for SSA_NAME: _54 in statement: vectp.20_198 = &*cc_36(D)[_54]; Breakpoint 2, internal_error (gmsgid=0x1718ff4 "verify_ssa failed") which is because when we vectorize vect-9.f90:10:0: note: node vect-9.f90:10:0: note: stmt 0 _37 = *cc_36(D)[_35]; vect-9.f90:10:0: note: stmt 1 _37 = *cc_36(D)[_35]; the interleaving with _55 = *cc_36(D)[_54]; and a permutation of { 1 1 } will cause us to base the reference off a pointer to a ref that does not participate in the SLP node and thus is not considered when we look for the insertion place with vect_find_last_scalar_stmt_in_slp.