Additional asserts were added to ScalarEvolution to enforce
pointer/int type rules. An assert is triggered when the LSR pass
attempts to extend a pointer SCEV to an int SCEV in
GenerateTruncates.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp | ||
---|---|---|
4082 | Should we force Formula::getType() to always return an integer type, to avoid confusion like this in the future? | |
4101 | This doesn't look right; I think if F.ScaledReg->getType()->isPointerTy() is true, you need to "continue", so we don't try to use a partially-transformed formula? |
LGTM
llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp | ||
---|---|---|
4082 | At the moment, Formula::getType() is picking the type of a random part of the formula, basically. It seems like picking consistently would be an improvement? (In any case, doesn't need to be part of this patch.) |
Should we force Formula::getType() to always return an integer type, to avoid confusion like this in the future?