[polly] [Polly] Skip vectorize.enable for FP loops with dist=1 dependences (PR #205756)

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 13 04:53:10 PDT 2026


Meinersbur wrote:

Like Eli, I think this is a bug in LoopVectorize: `llvm.loop.vectorize.enable` should not override the correctness check. These metadata correspond to
 * `#pragma clang loop vectorize(enable)`: Skip the profitability check, keep the correctness check (#198726)
 * `#pragma clang loop vectorize(assume_safety)`: Skip the profitability and correctness checks

Since Polly already checked the dependencies, it is actually meant to be the second, but it only adds `llvm.loop.parallel_accesses`, saying nothing about floating point reassociate. I think LoopVectorize should just honor the fast-math flags. If `vectorize(assume_safety)` is also meant to allow fp reassociation, there should be another metadata that Polly does not set (like it doesn't set  `llvm.loop.vectorize.enable` by default, only `llvm.loop.parallel_accesses`).


https://github.com/llvm/llvm-project/pull/205756


More information about the llvm-commits mailing list