[PATCH] D93973: [SCEV] Simplify trunc to zero based on known bits
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 2 02:10:06 PST 2021
nikic added inline comments.
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:1157
+ if (MinTrailingZeros >= getTypeSizeInBits(Ty))
+ return getZero(Ty);
+
----------------
This check should be lower in the function. Certainly doesn't make sense to do this before the folding set lookup or the constant folding. I think the right position is directly before a new SCEVTruncateExpr is allocated, i.e. after trunc has already been pushed through operations where possible.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93973/new/
https://reviews.llvm.org/D93973
More information about the llvm-commits
mailing list