HomePhabricator

[LoopVectorize] Fix crash for predicated instruction with scalable VF

Authored by CarolineConcatto on May 5 2021, 7:20 AM.

Description

[LoopVectorize] Fix crash for predicated instruction with scalable VF

This patch avoids computing discounts for predicated instructions when the
VF is scalable.
There is no support for vectorization of loops with division because the
vectorizer cannot guarantee that zero divisions will not happen.

This loop now does not use VF scalable

for (long long i = 0; i < n; i++)
    if (cond[i])
      a[i] /= b[i];

Differential Revision: https://reviews.llvm.org/D101916