[LV] [ScalarEvolution] Feedback on bug 34965 - After r311849 Loop Vectorizer crashes with "The instruction should be scalarized"

Hi!

I uploaded a tentative patch for the following bug in LV (https://bugs.llvm.org/show_bug.cgi?id=34965) but I have some concerns about it. I would appreciate if someone with more experience in SE/PSE can provide some feedback about current tentative fix and alternative solutions described in the comments.

Thanks!
Diego Caballero,
Intel Vectorizer Team

Patches are best submitted to phabricator (or to the llvm-commits mailing list). See also https://llvm.org/docs/DeveloperPolicy.html#making-and-submitting-a-patch

  • Matthias

+1 Even if you believe that the fix may not be correct, it is still best to post it for review. It is easiest for us to evaluate the situation that way. Include in the patch description all of the information relevant, for example, it is perfectly appropriate to include all of in your patch description. -Hal P.S. I agree with your conclusions based on your description of what’s going on: We need to cache the results before we start transforming things. I also agree that we should potentially be concerned with maintaining the cache in the face of new predicates being added. Maybe we should instantiate the cached values as a separate setup after all predicates have been added?

Thanks for the suggestions. I didn’t want to create a code review yet but, yes, it’s definitely the best idea.

We can move the discussion then to https://reviews.llvm.org/D39346

Thanks,