[llvm] r270629 - [LoopUnrollAnalyzer] Fix a crash in UnrolledInstAnalyzer::visitCastInst.

Michael Zolotukhin via llvm-commits llvm-commits at lists.llvm.org
Tue May 24 18:50:20 PDT 2016

> On May 24, 2016, at 6:41 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
> On Tue, May 24, 2016 at 6:24 PM, Michael Zolotukhin <mzolotukhin at apple.com <mailto:mzolotukhin at apple.com>> wrote:
>> When asked for a value at some iteration, SCEV considers ‘null' as 0 and returns, for instance, ‘i32 24’. I’m not sure if it’s incorrect, that’s why I fixed it in this spot.
>> Maybe you could construct an inttoptr constant expression in UnrolledInstAnalyzer::simplifyInstWithSCEV instead of trying to recover later?
> That would require adding a special case handling to simplifyInstWithSCEV, which I prefer to avoid. Currently we don’t look at what type of instruction we’re analyzing at all - we completely rely on SCEV there.
> Okay.  It would be nice to document somewhere in the source code, since it's a hazard for anyone updating the code.  Also, there's a missing check for the type of the constants in visitCmpInst.
Thanks, I’ll follow up on this!

> -Eli

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160524/071dee60/attachment.html>

More information about the llvm-commits mailing list