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

            Bug ID: 121523
           Summary: [16 Regression] RISC-V: ICE in apply_scale, at
                    profile-count.h:1187 since r16-3065-geee51f9a4b6
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ewlu at rivosinc dot com
  Target Milestone: ---

Created attachment 62106
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=62106&action=edit
freport-bug output

Haven't looked at our postcommit in a while so this was just sitting there. Not
sure if I missed a bug report for it already 

We're seeing the following errors (to name a few)

FAIL: g++.dg/vect/vect-early-break_6.cc  -std=c++17 (internal compiler error:
in apply_scale, at profile-count.h:1187)
FAIL: g++.dg/vect/vect-early-break_6.cc  -std=c++17 (test for excess errors)
FAIL: g++.dg/vect/vect-early-break_6.cc  -std=c++26 (internal compiler error:
in apply_scale, at profile-count.h:1187)
FAIL: g++.dg/vect/vect-early-break_6.cc  -std=c++26 (test for excess errors)
FAIL: g++.dg/vect/vect-early-break_6.cc  -std=c++98 (internal compiler error:
in apply_scale, at profile-count.h:1187)
FAIL: g++.dg/vect/vect-early-break_6.cc  -std=c++98 (test for excess errors)
FAIL: gcc.dg/vect/pr51581-1.c (internal compiler error: in apply_scale, at
profile-count.h:1187)
FAIL: gcc.dg/vect/pr51581-1.c (test for excess errors)
FAIL: gcc.dg/vect/pr51581-1.c -flto -ffat-lto-objects (internal compiler error:
in apply_scale, at profile-count.h:1187)
FAIL: gcc.dg/vect/pr51581-1.c -flto -ffat-lto-objects (test for excess errors)
FAIL: gcc.dg/vect/pr51581-2.c (internal compiler error: in apply_scale, at
profile-count.h:1187)
FAIL: gcc.dg/vect/pr51581-2.c (test for excess errors)
FAIL: gcc.dg/vect/pr51581-2.c -flto -ffat-lto-objects (internal compiler error:
in apply_scale, at profile-count.h:1187)
FAIL: gcc.dg/vect/pr51581-2.c -flto -ffat-lto-objects (test for excess errors)
FAIL: gcc.dg/vect/pr56826.c (internal compiler error: in apply_scale, at
profile-count.h:1187)
FAIL: gcc.dg/vect/pr56826.c (test for excess errors)
FAIL: gcc.dg/vect/pr56826.c -flto -ffat-lto-objects (internal compiler error:
in apply_scale, at profile-count.h:1187)
FAIL: gcc.dg/vect/pr56826.c -flto -ffat-lto-objects (test for excess errors)
FAIL: gcc.dg/vect/vect-bic-bitmask-10.c (internal compiler error: in
apply_scale, at profile-count.h:1187)
FAIL: gcc.dg/vect/vect-bic-bitmask-10.c (test for excess errors)
FAIL: gcc.dg/vect/vect-bic-bitmask-10.c -flto -ffat-lto-objects (internal
compiler error: in apply_scale, at profile-count.h:1187)
FAIL: gcc.dg/vect/vect-bic-bitmask-10.c -flto -ffat-lto-objects (test for
excess errors)
FAIL: gcc.dg/vect/vect-bic-bitmask-11.c (internal compiler error: in
apply_scale, at profile-count.h:1187)
FAIL: gcc.dg/vect/vect-bic-bitmask-11.c (test for excess errors)
FAIL: gcc.dg/vect/vect-bic-bitmask-11.c -flto -ffat-lto-objects (internal
compiler error: in apply_scale, at profile-count.h:1187)
FAIL: gcc.dg/vect/vect-bic-bitmask-11.c -flto -ffat-lto-objects (test for
excess errors)
FAIL: gcc.dg/vect/vect-bic-bitmask-2.c (internal compiler error: in
apply_scale, at profile-count.h:1187)
FAIL: gcc.dg/vect/vect-bic-bitmask-2.c (test for excess errors)
FAIL: gcc.dg/vect/vect-bic-bitmask-2.c -flto -ffat-lto-objects (internal
compiler error: in apply_scale, at profile-count.h:1187)
FAIL: gcc.dg/vect/vect-bic-bitmask-2.c -flto -ffat-lto-objects (test for excess
errors)
FAIL: gcc.dg/vect/vect-bic-bitmask-3.c (internal compiler error: in
apply_scale, at profile-count.h:1187)
FAIL: gcc.dg/vect/vect-bic-bitmask-3.c (test for excess errors)
FAIL: gcc.dg/vect/vect-bic-bitmask-3.c -flto -ffat-lto-objects (internal
compiler error: in apply_scale, at profile-count.h:1187)
FAIL: gcc.dg/vect/vect-bic-bitmask-3.c -flto -ffat-lto-objects (test for excess
errors)
FAIL: gcc.dg/vect/vect-bic-bitmask-4.c (internal compiler error: in
apply_scale, at profile-count.h:1187)
FAIL: gcc.dg/vect/vect-bic-bitmask-4.c (test for excess errors)
FAIL: gcc.dg/vect/vect-bic-bitmask-4.c -flto -ffat-lto-objects (internal
compiler error: in apply_scale, at profile-count.h:1187)
FAIL: gcc.dg/vect/vect-bic-bitmask-4.c -flto -ffat-lto-objects (test for excess
errors)
FAIL: gcc.dg/vect/vect-bic-bitmask-5.c (internal compiler error: in
apply_scale, at profile-count.h:1187)
FAIL: gcc.dg/vect/vect-bic-bitmask-5.c (test for excess errors)
FAIL: gcc.dg/vect/vect-bic-bitmask-5.c -flto -ffat-lto-objects (internal
compiler error: in apply_scale, at profile-count.h:1187)
FAIL: gcc.dg/vect/vect-bic-bitmask-5.c -flto -ffat-lto-objects (test for excess
errors)
FAIL: gcc.dg/vect/vect-bic-bitmask-6.c (internal compiler error: in
apply_scale, at profile-count.h:1187)
FAIL: gcc.dg/vect/vect-bic-bitmask-6.c (test for excess errors)
FAIL: gcc.dg/vect/vect-bic-bitmask-6.c -flto -ffat-lto-objects (internal
compiler error: in apply_scale, at profile-count.h:1187)
FAIL: gcc.dg/vect/vect-bic-bitmask-6.c -flto -ffat-lto-objects (test for excess
errors)
FAIL: gcc.dg/vect/vect-bic-bitmask-8.c (internal compiler error: in
apply_scale, at profile-count.h:1187)
FAIL: gcc.dg/vect/vect-bic-bitmask-8.c (test for excess errors)
FAIL: gcc.dg/vect/vect-bic-bitmask-8.c -flto -ffat-lto-objects (internal
compiler error: in apply_scale, at profile-count.h:1187)
FAIL: gcc.dg/vect/vect-bic-bitmask-8.c -flto -ffat-lto-objects (test for excess
errors)
FAIL: gcc.dg/vect/vect-bic-bitmask-9.c (internal compiler error: in
apply_scale, at profile-count.h:1187)
FAIL: gcc.dg/vect/vect-bic-bitmask-9.c (test for excess errors)
FAIL: gcc.dg/vect/vect-bic-bitmask-9.c -flto -ffat-lto-objects (internal
compiler error: in apply_scale, at profile-count.h:1187)
FAIL: gcc.dg/vect/vect-bic-bitmask-9.c -flto -ffat-lto-objects (test for excess
errors)
FAIL: gcc.dg/vect/vect-early-break_135-pr120143.c (internal compiler error: in
apply_scale, at profile-count.h:1187)
FAIL: gcc.dg/vect/vect-early-break_135-pr120143.c (test for excess errors)
FAIL: gcc.target/riscv/rvv/autovec/pr112598-1.c -O3 -ftree-vectorize (internal
compiler error: in apply_scale, at profile-count.h:1187)
FAIL: gcc.target/riscv/rvv/autovec/pr112598-1.c -O3 -ftree-vectorize (test for
excess errors)
FAIL: gcc.target/riscv/rvv/autovec/unop/sew64-rv32.c -ftree-vectorize -O2
-mrvv-max-lmul=dynamic (internal compiler error: in apply_scale, at
profile-count.h:1187)
FAIL: gcc.target/riscv/rvv/autovec/unop/sew64-rv32.c -ftree-vectorize -O2
-mrvv-max-lmul=dynamic (test for excess errors)
FAIL: gcc.target/riscv/rvv/autovec/unop/sew64-rv32.c -ftree-vectorize -O2
-mrvv-max-lmul=m1 (internal compiler error: in apply_scale, at
profile-count.h:1187)
FAIL: gcc.target/riscv/rvv/autovec/unop/sew64-rv32.c -ftree-vectorize -O2
-mrvv-max-lmul=m1 (test for excess errors)
FAIL: gcc.target/riscv/rvv/autovec/unop/sew64-rv32.c -ftree-vectorize -O2
-mrvv-max-lmul=m2 (internal compiler error: in apply_scale, at
profile-count.h:1187)
FAIL: gcc.target/riscv/rvv/autovec/unop/sew64-rv32.c -ftree-vectorize -O2
-mrvv-max-lmul=m2 (test for excess errors)
FAIL: gcc.target/riscv/rvv/autovec/unop/sew64-rv32.c -ftree-vectorize -O2
-mrvv-max-lmul=m4 (internal compiler error: in apply_scale, at
profile-count.h:1187)
FAIL: gcc.target/riscv/rvv/autovec/unop/sew64-rv32.c -ftree-vectorize -O2
-mrvv-max-lmul=m4 (test for excess errors)
FAIL: gcc.target/riscv/rvv/autovec/unop/sew64-rv32.c -ftree-vectorize -O2
-mrvv-max-lmul=m8 (internal compiler error: in apply_scale, at
profile-count.h:1187)
FAIL: gcc.target/riscv/rvv/autovec/unop/sew64-rv32.c -ftree-vectorize -O2
-mrvv-max-lmul=m8 (test for excess errors)
FAIL: gcc.target/riscv/rvv/autovec/unop/sew64-rv32.c -ftree-vectorize -O3
-mrvv-max-lmul=dynamic (internal compiler error: in apply_scale, at
profile-count.h:1187)
FAIL: gcc.target/riscv/rvv/autovec/unop/sew64-rv32.c -ftree-vectorize -O3
-mrvv-max-lmul=dynamic (test for excess errors)
FAIL: gcc.target/riscv/rvv/autovec/unop/sew64-rv32.c -ftree-vectorize -O3
-mrvv-max-lmul=m1 (internal compiler error: in apply_scale, at
profile-count.h:1187)
FAIL: gcc.target/riscv/rvv/autovec/unop/sew64-rv32.c -ftree-vectorize -O3
-mrvv-max-lmul=m1 (test for excess errors)
FAIL: gcc.target/riscv/rvv/autovec/unop/sew64-rv32.c -ftree-vectorize -O3
-mrvv-max-lmul=m2 (internal compiler error: in apply_scale, at
profile-count.h:1187)
FAIL: gcc.target/riscv/rvv/autovec/unop/sew64-rv32.c -ftree-vectorize -O3
-mrvv-max-lmul=m2 (test for excess errors)
FAIL: gcc.target/riscv/rvv/autovec/unop/sew64-rv32.c -ftree-vectorize -O3
-mrvv-max-lmul=m4 (internal compiler error: in apply_scale, at
profile-count.h:1187)
FAIL: gcc.target/riscv/rvv/autovec/unop/sew64-rv32.c -ftree-vectorize -O3
-mrvv-max-lmul=m4 (test for excess errors)
FAIL: gcc.target/riscv/rvv/autovec/unop/sew64-rv32.c -ftree-vectorize -O3
-mrvv-max-lmul=m8 (internal compiler error: in apply_scale, at
profile-count.h:1187)
FAIL: gcc.target/riscv/rvv/autovec/unop/sew64-rv32.c -ftree-vectorize -O3
-mrvv-max-lmul=m8 (test for excess errors)

https://github.com/patrick-rivos/gcc-postcommit-ci/issues/3740

Bisected to r16-3065-geee51f9a4b6 as the first bad commit

Godbolt: https://godbolt.org/z/q1q4ebcWc

// dump file: ./pr51581-1.c.185t.vect
//
/scratch/ewlu/ci/triage/baseline/gcc/gcc/testsuite/gcc.dg/vect/../../gcc.c-torture/execute/pr51581-1.c:
In function 'main1':
//
/scratch/ewlu/ci/triage/baseline/gcc/gcc/testsuite/gcc.dg/vect/pr51581-1.c:5:14:
internal compiler error: in apply_scale, at profile-count.h:1187
//
/scratch/ewlu/ci/triage/baseline/gcc/gcc/testsuite/gcc.dg/vect/../../gcc.c-torture/execute/pr51581-1.c:113:1:
note: in expansion of macro 'main'
// 0x2f36896 internal_error(char const*, ...)
//      ../../../gcc/gcc/diagnostic-global-context.cc:534
// 0xd8b9b5 fancy_abort(char const*, int, char const*)
//      ../../../gcc/gcc/diagnostics/context.cc:1640
// 0xb7552e profile_count::apply_scale(long, long) const
//      ../../../gcc/gcc/profile-count.h:1187
// 0xb7552e profile_count::apply_scale(long, long) const
//      ../../../gcc/gcc/profile-count.h:1178
// 0xb7552e profile_count::operator*(long) const
//      ../../../gcc/gcc/profile-count.h:1083
// 0xb7552e scale_loop_profile(loop*, profile_probability, long)
//      ../../../gcc/gcc/cfgloopmanip.cc:737
// 0x187b1b4 vect_do_peeling(_loop_vec_info*, tree_node*, tree_node*,
tree_node**, tree_node**, tree_node**, int, bool, bool, tree_node**)
//      ../../../gcc/gcc/tree-vect-loop-manip.cc:3407
// 0x186a8c0 vect_transform_loop(_loop_vec_info*, gimple*)
//      ../../../gcc/gcc/tree-vect-loop.cc:11491
// 0x18b8258 vect_transform_loops
//      ../../../gcc/gcc/tree-vectorizer.cc:1040
// 0x18b8904 try_vectorize_loop_1
//      ../../../gcc/gcc/tree-vectorizer.cc:1189
// 0x18b8904 try_vectorize_loop
//      ../../../gcc/gcc/tree-vectorizer.cc:1219
// 0x18b8cbc execute
//      ../../../gcc/gcc/tree-vectorizer.cc:1335
// Please submit a full bug report, with preprocessed source.
// Please include the complete backtrace with any bug report.
// See <https://gcc.gnu.org/bugs/> for instructions.

Reply via email to