<div dir="ltr"><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><font face="times new roman, serif">Hi,</font></div><div><font face="times new roman, serif"><br></font></div><div><font face="times new roman, serif">Consider the following LLVM IR snippet. (also attached)</font></div><div><font face="times new roman, serif"><br></font></div><div><font face="times new roman, serif">the value of %unify.phi is undefined if the loop body (while.body9)  is executed, otherwise it has some specific value (%c.1 is a defined value).</font></div><div><font face="times new roman, serif"><br></font></div><div><font face="times new roman, serif">However when I execute this IR (using lli), the value of %c.2 is always the value of %c.1, even if the loop is executed multiple times.</font></div><div><font face="times new roman, serif"><br></font></div><div><font face="times new roman, serif">What is the reason for this behavior?  how undefined values are handled in LLVM and is this behaviour architecture dependent (depending on how undef is handled in Codegen) ?</font></div><div><font face="times new roman, serif"><br></font></div><div><font face="times new roman, serif">Thanks</font></div><div><font face="times new roman, serif">Charitha</font></div><div><font face="times new roman, serif"><br></font></div><div><img src="cid:ii_kscjfoku0" alt="Screen Shot 2021-08-14 at 9.36.28 PM.png" width="563" height="479"><br></div><div><font face="times new roman, serif"><br></font></div></div></div></div></div></div></div>