[PATCH] D75746: [LoopVectorizer] Simplify branch in the remainder loop for trivial cases
Danila Malyutin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 6 07:41:56 PST 2020
danilaml marked an inline comment as done.
danilaml added inline comments.
================
Comment at: llvm/test/Transforms/LoopVectorize/if-pred-stores.ll:278
; VEC-NEXT: call void @llvm.assume(i1 [[TMP0]])
-; VEC-NEXT: br label [[FOR_BODY14:%.*]]
-; VEC: for.body14:
-; VEC-NEXT: [[INDVARS_IV3:%.*]] = phi i64 [ [[INDVARS_IV_NEXT4:%.*]], [[FOR_INC23:%.*]] ], [ undef, [[ENTRY:%.*]] ]
-; VEC-NEXT: [[INEWCHUNKS_120:%.*]] = phi i32 [ [[INEWCHUNKS_2:%.*]], [[FOR_INC23]] ], [ undef, [[ENTRY]] ]
-; VEC-NEXT: [[ARRAYIDX16:%.*]] = getelementptr inbounds [768 x i32], [768 x i32]* undef, i64 0, i64 [[INDVARS_IV3]]
-; VEC-NEXT: [[TMP:%.*]] = load i32, i32* [[ARRAYIDX16]], align 4
-; VEC-NEXT: br i1 undef, label [[IF_THEN18:%.*]], label [[FOR_INC23]]
-; VEC: if.then18:
-; VEC-NEXT: store i32 2, i32* [[ARRAYIDX16]], align 4
-; VEC-NEXT: [[INC21:%.*]] = add nsw i32 [[INEWCHUNKS_120]], 1
-; VEC-NEXT: br label [[FOR_INC23]]
-; VEC: for.inc23:
-; VEC-NEXT: [[INEWCHUNKS_2]] = phi i32 [ [[INC21]], [[IF_THEN18]] ], [ [[INEWCHUNKS_120]], [[FOR_BODY14]] ]
-; VEC-NEXT: [[INDVARS_IV_NEXT4]] = add nsw i64 [[INDVARS_IV3]], 1
-; VEC-NEXT: [[TMP1:%.*]] = trunc i64 [[INDVARS_IV3]] to i32
-; VEC-NEXT: [[CMP13:%.*]] = icmp slt i32 [[TMP1]], 0
-; VEC-NEXT: call void @llvm.assume(i1 [[CMP13]])
-; VEC-NEXT: br label [[FOR_BODY14]]
+; VEC-NEXT: unreachable
;
----------------
this transform seems correct, but not sure if the original purpose of this test is still fulfilled
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75746/new/
https://reviews.llvm.org/D75746
More information about the llvm-commits
mailing list