[llvm] [LV] Don't predicate uniform divides with loop-invariant divisor. (PR #98904)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 15 07:01:17 PDT 2024


================
@@ -3917,9 +3929,10 @@ void LoopVectorizationCostModel::collectLoopUniforms(ElementCount VF) {
                         << *I << "\n");
       return;
     }
-    if (isScalarWithPredication(I, VF)) {
-      LLVM_DEBUG(dbgs() << "LV: Found not uniform being ScalarWithPredication: "
-                        << *I << "\n");
+    if (isPredicatedInst(I, VF, true)) {
----------------
alexey-bataev wrote:

```suggestion
    if (isPredicatedInst(I, VF, /*IsKnownUniform=*/true)) {
```


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


More information about the llvm-commits mailing list