<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">I’ve run 'make check-all’ with llvm_unreachable in the branch where we discard a user, and actually got some interesting result. There were two failing tests, one of which is obviously the just added test.<div><br><div>The second one is CodeGen/X86/lsr-normalization.ll, and here is what I got there:</div><div><br></div><div><div>   ORIGINAL ISE: <span class="Apple-tab-span" style="white-space:pre">                               </span>{(100 /u {1,+,1}<%bb16>),+,(100 /u {1,+,1}<%bb16>)}<%bb25></div><div>   NORMALIZED ISE: <span class="Apple-tab-span" style="white-space:pre">                    </span>{((-1 * (100 /u {1,+,1}<%bb16>)) + (100 /u {0,+,1}<%bb16>)),+,(100 /u {0,+,1}<%bb16>)}<%bb25></div><div>   DENORMALIZED BACK ISE: <span class="Apple-tab-span" style="white-space:pre">    </span>{((2 * (100 /u {1,+,1}<%bb16>)) + (-1 * (100 /u {2,+,1}<%bb16>))),+,(100 /u {1,+,1}<%bb16>)}<%bb25></div></div><div><br></div><div>This could give an idea of what opportunities we could lose due to this change. Maybe we need to act so conservatively only in danger of overflow, i.e. when the original expression has sign-extensions/wrap-flags?</div><div><br></div><div>Thanks,</div><div>Michael</div><div><br><div><div>On Mar 10, 2014, at 5:01 PM, Andrew Trick <<a href="mailto:atrick@apple.com">atrick@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Mar 10, 2014, at 5:00 PM, Eric Christopher <<a href="mailto:echristo@gmail.com">echristo@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><blockquote type="cite">As we discussed, once you have finished running the test-suite with a check<br>to find out if any important cases are no longer normalized as expected,<br>then I think you can commit. I know you've already verified performance, so<br>this is just an extra sanity check.<br><br></blockquote><br>Any interesting results?<br></div></blockquote><div><br></div>No performance changes, just fixing PR17473.</div><div><br></div><div>-Andy</div><div><br><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br>-eric<br><br><blockquote type="cite">Thanks.<br><br>-Andy<br><br><br>Thanks,<br>Michael<br><br>Thanks,<br>Arnold<br><br>On Mar 10, 2014, at 2:56 PM, Michael Zolotukhin <<a href="mailto:mzolotukhin@apple.com">mzolotukhin@apple.com</a>><br>wrote:<br><br>Hi,<br><br>This is a fix for PR17473. The issue is that LSR performs normalization of<br>detected IV users and sometimes wants to denormalize it back hoping to get<br>the original expression. But normalization isn't always invertible, and the<br>new expression might be not equivalent to the original one. In the test<br>case, we were losing sign-extension in such transformation. The patch simply<br>adds a check, if the transformation is invertible.<br><br><pr17473.patch><br><br>Ok for trunk?<br><br>Thanks,<br>Michael<br><br><br><br>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a></blockquote></div></blockquote></div><br></div></blockquote></div><br></div></div></body></html>