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

--- Comment #10 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
(In reply to rsand...@gcc.gnu.org from comment #9)
> Are we sure this is a vectoriser vs. C vectors thing?

it's not, the issue we're debating is how to fix it.

As Richi pointed out https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108583#c4 we
can fix the vectorizer case by adding a guard around the recog code in the
vectorizer.

But that only fixes the vectorizer, and Richi asked why that wasn't enough, to
which I pointed out it's because intrinsics code hits it as well.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108583#c5

This is why I mentioned that there are two ways to fix this:

1. We make the hook less general, and add checks in every place it is called.
2. We keep the hook general and pass enough context to the hook for it to
decide how to optimize the division.

it's not intrinsics only, but a vectorizer only fix won't fix intrinsics.

Reply via email to