[Bug tree-optimization/125953] [13/14/15/16/17 Regression] vect_recog_divmod_pattern uses ranger on pattern stmts

amacleod at redhat dot com gcc-bugzilla@gcc.gnu.org
Tue Jun 23 15:41:59 GMT 2026


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

--- Comment #1 from Andrew Macleod <amacleod at redhat dot com> ---
Hmm. I would have said we did, but i don't see it.

It would not be difficult to perform a global query if the stmt has no basic
block set.   I would have sworn we did that  :-P

Maybe we decided it doesn't make sense to pass in a stmt for context that isn't
in the IL?  there is no context in that case, so passing it in might be in
error?

I'm OK wither way.. in range_of_expr, something like

  // If there is no statement, just get the global value.
-  if (!stmt)
+  if (!stmt || !gimple_bb (stmt))


More information about the Gcc-bugs mailing list