[PATCH] D91724: [HardwareLoops] Change order of SCEV expression construction for InitLoopCount.
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 2 15:27:45 PDT 2021
reames added a comment.
Glanced at this due to being CCed on pr51714.
This patch does not look correct on first glance. If backedge taken count is UINT_MAX for the narrower type, doing the increment in the narrow type produces zext(0) e.g. zero, whereas doing the zext(BTC)+1 does not. Unless there's something in the code which prevents BTC=UINT_MAX/TC=0, I suspect that's the cause of the miscompile being observed in that bug and this patch should be reverted.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91724/new/
https://reviews.llvm.org/D91724
More information about the llvm-commits
mailing list