<div dir="ltr"><div>(((15 + %add144.sink230.i) * (%blocksize /u %bytesoftype)) + {%_dest,+,16}<%for.cond1.preheader.i59>)<nsw></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 4, 2016 at 2:24 PM, Friedman, Eli <span dir="ltr"><<a href="mailto:efriedma@codeaurora.org" target="_blank">efriedma@codeaurora.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 10/4/2016 11:13 AM, Charith Mendis wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
How do you generate a SCEVAddRecExpr from a SCEV? It tried dyn_casting and it seems like that the SCEV returned by getSCEV is not a SCEVAddRecExpr.<br>
</blockquote>
<br></span>
You can dyn_cast if it's actually an AddRec... but not all expressions can be represented as an AddRec.<br>
<br>
SCEV has a dump() method which can be helpful for debugging.  What does E->dump() on the SCEV in question look like?  What does the IR look like?<div class="HOEnZb"><div class="h5"><br>
<br>
-Eli<br>
<br>
-- <br>
Employee of Qualcomm Innovation Center, Inc.<br>
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Kind regards,<br>Charith Mendis<br><br>Graduate Student,<div>CSAIL,<br><div>Massachusetts Institute of Technology</div></div></div></div></div>
</div>