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

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Tue May 24 18:41:54 PDT 2016


On Tue, May 24, 2016 at 6:24 PM, Michael Zolotukhin <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.

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


More information about the llvm-commits mailing list