[llvm] [LoopVectorize] LLVM fails to vectorise loops with multi-bool varables (PR #89226)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 25 03:55:39 PDT 2024


================
@@ -47,3 +43,38 @@ for.cond.cleanup.loopexit:                        ; preds = %for.body
 for.cond.cleanup:                                 ; preds = %for.cond.cleanup.loopexit, %entry
   ret void
 }
+
+define i32 @multi_user_cmp(ptr readonly %a, i32 noundef %n) {
+; CHECK: LV: Found an estimated cost of 4 for VF 16 For instruction:   %cmp1 = fcmp olt float %load1, 0.000000e+00
----------------
david-arm wrote:

Sorry @dtemirbulatov I just have one more comment. I guess it may be my fault you're hitting this issue, but at the moment these CHECK lines are fragile and it's not obvious which function we are actually testing. That's because these CHECK lines could in theory match the CHECK lines in `@selects_1`. In each function the CHECK line should start with:

```
define void @selects_1(ptr nocapture %dst, i32 %A, i32 %B, i32 %C, i32 %N) {
; CHECK-LABEL: LV: Checking a loop in 'selects_1'
... existing CHECKs ...
...
}

define i32 @multi_user_cmp(ptr readonly %a, i32 noundef %n) {
; CHECK-LABEL: LV: Checking a loop in 'multi_user_cmp'
... existing CHECKs ...
...
}

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


More information about the llvm-commits mailing list