[PATCH] D109676: [HardwareLoops] put +1 for loop count before zero extension
ChenZheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 13 01:58:06 PDT 2021
shchenz added inline comments.
================
Comment at: llvm/test/Transforms/HardwareLoops/scalar-while.ll:311
; CHECK-PHIGUARD-NEXT: entry:
; CHECK-PHIGUARD-NEXT: [[CMP4:%.*]] = icmp slt i32 [[I:%.*]], [[N:%.*]]
; CHECK-PHIGUARD-NEXT: [[TMP0:%.*]] = add i32 [[I]], 1
----------------
The test changes is due to `isLoopEntryGuardedByCond` can not determine that SCEV `(1 + (-1 * %N) + %i)` is at least 1 before. But now, we assume that the TripCount is at least 1 if we enter the loop. And we also check that TripCount will not overflow when we set TripCount.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109676/new/
https://reviews.llvm.org/D109676
More information about the llvm-commits
mailing list