[llvm] [LV] Move check if any vector insts will be generated to VPlan. (PR #96622)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 5 03:46:23 PDT 2024
================
@@ -65,8 +65,9 @@ define void @vplan_incomplete_cases_tc3(i8 %x, i8 %y) {
; CHECK-NEXT: br label %[[VECTOR_BODY:.*]]
; CHECK: [[VECTOR_BODY]]:
; CHECK-NEXT: [[INDEX:%.*]] = phi i32 [ 0, %[[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], %[[VECTOR_BODY]] ]
-; CHECK-NEXT: [[INDEX_NEXT]] = add i32 [[INDEX]], 4
-; CHECK-NEXT: br i1 true, label %[[MIDDLE_BLOCK:.*]], label %[[VECTOR_BODY]], !llvm.loop [[LOOP4:![0-9]+]]
+; CHECK-NEXT: [[INDEX_NEXT]] = add i32 [[INDEX]], 2
+; CHECK-NEXT: [[TMP0:%.*]] = icmp eq i32 [[INDEX_NEXT]], 4
+; CHECK-NEXT: br i1 [[TMP0]], label %[[MIDDLE_BLOCK:.*]], label %[[VECTOR_BODY]], !llvm.loop [[LOOP4:![0-9]+]]
----------------
fhahn wrote:
I've undone the change, this now won't get vectorized due to the vector loop body being empty (except canonical IV, increment, compare and branch). It still serves its original purpose (checking type inference for logical AND VPInst)
https://github.com/llvm/llvm-project/pull/96622
More information about the llvm-commits
mailing list