https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92033
Bug ID: 92033 Summary: ICE during dom with -march=armv8.2-a+sve Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: prathamesh3492 at gcc dot gnu.org Target Milestone: --- Hi, With PR89007 test-case: #define N 1024 unsigned char dst[N]; unsigned char in1[N]; unsigned char in2[N]; void foo () { for( int x = 0; x < N; x++ ) dst[x] = (in1[x] + in2[x] + 1) >> 1; } Compiling with -O3 -march=armv8.2-a+sve results in following ICE: pr89007.c: In function ‘foo’: pr89007.c:7:1: internal compiler error: tree check: expected integer_cst, have poly_int_cst in to_wide, at tree.h:5795 7 | foo () | ^~~ 0x722ffd tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../gcc/gcc/tree.c:9924 0x721307 tree_check(tree_node const*, char const*, int, char const*, tree_code) ../../gcc/gcc/tree.h:3523 0x721307 wi::to_wide(tree_node const*) ../../gcc/gcc/tree.h:5795 0x721307 value_range_base::lower_bound(unsigned int) const ../../gcc/gcc/tree-vrp.c:6136 0x104e03f value_range_base::lower_bound(unsigned int) const ../../gcc/gcc/tree-vrp.c:6123 0x1604c36 range_operator::fold_range(tree_node*, value_range_base const&, value_range_base const&) const ../../gcc/gcc/range-op.cc:156 0x104fb21 range_fold_binary_expr(value_range_base*, tree_code, tree_node*, value_range_base const*, value_range_base const*) ../../gcc/gcc/tree-vrp.c:1915 0x10cad37 vr_values::extract_range_from_binary_expr(value_range*, tree_code, tree_node*, tree_node*, tree_node*) ../../gcc/gcc/vr-values.c:808 0x10cd7a8 vr_values::extract_range_from_assignment(value_range*, gassign*) ../../gcc/gcc/vr-values.c:1466 0x1538ef5 evrp_range_analyzer::record_ranges_from_stmt(gimple*, bool) ../../gcc/gcc/gimple-ssa-evrp-analyze.c:307 0xec9e9b dom_opt_dom_walker::before_dom_children(basic_block_def*) ../../gcc/gcc/tree-ssa-dom.c:1503 0x150fae7 dom_walker::walk(basic_block_def*) ../../gcc/gcc/domwalk.c:309 0xec7c94 execute ../../gcc/gcc/tree-ssa-dom.c:724 Possibly caused by r276504. Thanks, Prathamesh