<div dir="ltr">Hi,<div><br></div><div>I found out that we do not have nuw and nsw flags for some situations. I ran test cases with range metadata: !2 = !{i16 0, i16 128}</div><div><br></div><div>And I get nuw, nsw flags for</div><div><br></div><div><div> %A = add i16 %x, 2</div><div> --> (2 + %x)<nuw><nsw> U: [2,130) S: [2,130)</div></div><div><br></div><div>But for below cases, there are no nuw or nsw flags shown.</div><div><div><br></div><div> %A = add i16 %x, %x</div><div> --> (2 * %x) U: [0,255) S: [0,255)</div></div><div><br></div><div><div> %A = mul i16 %x, 2</div><div> --> (2 * %x) U: [0,255) S: [0,255)</div></div><div><br></div><div><div> %A = mul i16 %x, %x</div><div> --> (%x * %x) U: [0,16130) S: [0,16130)</div></div><div>
<br class="gmail-Apple-interchange-newline"><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">From the range we calculated here. Can't we have the flags?</span>
<br></div><div><br></div><div>And for instructions with nuw, I still did not get those flags. </div><div><div> %A = mul nuw i16 %x, %x</div><div> --> (%x * %x) U: [0,16130) S: [0,16130)</div><div><br></div><div><div> %A = add nuw i16 %x, %x</div><div> --> (2 * %x) U: [0,255) S: [0,255)</div></div><div><br></div><div>Are there any reasons for this behavior? Or is it okay to have those flags for cases mentioned above?</div><div><br></div><div>Thanks,</div><div>Lin-Ya</div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">From: <a href="mailto:yu810226@gmail.com" target="_blank">yu810226@gmail.com</a><div>于琳雅 (Lin-Ya Yu)</div></div></div></div></div>