[PATCH] D103656: [ScalarEvolution] Ensure backedge-taken counts are not pointers.
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 21 09:29:59 PDT 2021
reames accepted this revision.
reames added a comment.
This revision is now accepted and ready to land.
LGTM.
For the record, some of the test diffs are a bit concerning code quality wise, but I think we may need to accept them to achieve the goal. At least a couple of them have obvious possibilities for improvement in follow ups if needed, so I'm willing to have this go in. We may end up having to revert, fix a few things, then reapply though. We'll see.
Also, mostly for myself when reading through this later, this may regression exit counts for non-integral pointer tested loops, but that's - I think - okay because they're not idiomatic. Once (if?), we have a generic answer for pointer subtraction we can relax some of these and restore power while maintaining integer results.
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:1084
+ // theoretically teach SCEV to truncate wider pointers, but such pointer
+ // widths are generally used for non-integral pointers anyway.
if (getDataLayout().getTypeSizeInBits(getEffectiveSCEVType(Op->getType())) !=
----------------
Just for my context, they are? This is news to me. Do you have an example?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103656/new/
https://reviews.llvm.org/D103656
More information about the llvm-commits
mailing list