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

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Andrew, could you please have a look?
determine_block_size is doing:
3622              gimple *cg = currently_expanding_gimple_stmt;
3623              get_range_query (cfun)->range_of_expr (r, len, cg);
3624              range_type = get_legacy_range (r, tmin, tmax);
where cg is
__builtin_memset (_1, 0, _8);
and len is
 <ssa_name 0x7fffe992adc0
    type <integer_type 0x7fffe9a1c7e0 long unsigned int public unsigned DI
        size <integer_cst 0x7fffe9a02f30 constant 64>
        unit-size <integer_cst 0x7fffe9a02f48 constant 8>
        align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7fffe9a1c7e0 precision:64 min <integer_cst 0x7fffe9a1e210 0> max <integer_cst
0x7fffe9a03760 18446744073709551615>
        pointer_to_this <pointer_type 0x7fffe9a2e3f0>>
    visited
    def_stmt _8 = (long unsigned int) _7;
    version:8
    ptr-info 0x7fffe9a0dd80>
and gimple_assign_rhs1 (len->ssa_name.def_stmt)
 <ssa_name 0x7fffe992ad68
    type <integer_type 0x7fffe9a1c888 long long int public DI
        size <integer_cst 0x7fffe9a02f30 constant 64>
        unit-size <integer_cst 0x7fffe9a02f48 constant 8>
        align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7fffe9a1c888 precision:64 min <integer_cst 0x7fffe9a1e1f8
-9223372036854775808> max <integer_cst 0x7fffe9a1e228 9223372036854775807>
        pointer_to_this <pointer_type 0x7fffe9a2e498>>
    visited
    def_stmt _7 = _6 * 4;
    version:7
    ptr-info 0x7fffe99769a0>
and gimple_assign_rhs1 (gimple_assign_rhs1
(len->ssa_name.def_stmt)->ssa_name.def_stmt)
 <ssa_name 0x7fffe992ad10
    type <integer_type 0x7fffe9a1c888 long long int public DI
        size <integer_cst 0x7fffe9a02f30 constant 64>
        unit-size <integer_cst 0x7fffe9a02f48 constant 8>
        align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7fffe9a1c888 precision:64 min <integer_cst 0x7fffe9a1e1f8
-9223372036854775808> max <integer_cst 0x7fffe9a1e228 9223372036854775807>
        pointer_to_this <pointer_type 0x7fffe9a2e498>>
    visited
    def_stmt _6 = _2 w* _4;
    version:6
    ptr-info 0x7fffe98d66c0>
etc.
optimized dump has what I wrote above.
And the code uses int_range_max, so I don't see why it isn't getting
# RANGE [irange] long unsigned int [0, 0][4, 9223372036854775804] MASK
0x7ffffffffffffffc VALUE 0x0
or something similar but just
[irange] long unsigned int [0, 0] MASK 0x0 VALUE 0x0

Reply via email to