On 7/2/21 4:13 AM, Aldy Hernandez wrote:
Not objecting to anything here other than to note that I think we have cases where there's a COND_EXPR on the RHS of statements within a block. We're (in general) not handling those well in DOM or jump threading.+ +// Return the range of STMT as it would be seen at the end of the path +// being analyzed. Anything but the final conditional in a BB will +// return VARYING. + +void +path_solver::range_in_path (irange &r, gimple *stmt) +{ + if (gimple_code (stmt) == GIMPLE_COND && fold_range (r, stmt, this)) + return; + + r.set_varying (gimple_expr_type (stmt)); +}I guess I can put that on my TODO list :).
note that we are no longer in the days of range-ops only processing... fold_range handles COND_EXPR (and every other kind of stmt) just fine.
Andrew
