[PATCH] D124910: [SCEV] Use umin_seq for BECount of multi-exit loops
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 9 09:02:22 PDT 2022
nikic added inline comments.
================
Comment at: llvm/test/Transforms/IndVarSimplify/ARM/code-size.ll:140
+; CHECK-V8M-NEXT: [[UMIN:%.*]] = call i32 @llvm.umin.i32(i32 [[TMP0]], i32 [[LENGTH]])
+; CHECK-V8M-NEXT: [[TMP2:%.*]] = select i1 [[TMP1]], i32 0, i32 [[UMIN]]
+; CHECK-V8M-NEXT: [[TMP3:%.*]] = icmp ne i32 [[LENGTH]], [[TMP2]]
----------------
Worth noting that this gets InstCombined to `length == 0 || tmp0 >= length` -- we could further fold this to `freeze(tmp0) >= length` if we wanted.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124910/new/
https://reviews.llvm.org/D124910
More information about the llvm-commits
mailing list