[llvm] ValueTracking: Check if x is undef for fma(x, x, y) analysis (PR #174763)
Sergey Shcherbinin via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 28 05:27:55 PST 2026
SergeyShch01 wrote:
Hello @arsenm,
This commit caused a performance regression of the benchmark we are tracking. Could you please have a look?
The reproducer is as follows (should be compiled w/ -O3):
```
#include <cmath>
double kernel(int64_t ibegin, int64_t iend,
double x0, double h,
double y, double xp, double yp)
{
double sumx = 0.0;
for (int64_t i = ibegin; i < iend; ++i) {
double x = x0 + i * h;
double denom = (x - xp)*(x - xp) + (y - yp)*(y - yp);
denom = 1.0 / sqrt(denom);
sumx += denom;
}
return sumx;
}
```
This commit leads to the vectorization not beeing applied. Debug logs show the following message:
```
LV: Not vectorizing: Found a non-intrinsic callsite
```
On previous revision (12c89e40) this loop was successfully vectorized.
https://github.com/llvm/llvm-project/pull/174763
More information about the llvm-commits
mailing list