<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 3, 2015, at 10:20 AM, Chris Sears <<a href="mailto:chris.sears@gmail.com" class="">chris.sears@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_extra">I was using this GCC compiler comparison site. It's well done but unfortunately it's not up to date. The author Matt Godbolt said he was updating it:</div><div class="gmail_extra"><br class=""></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px" class=""><div class="gmail_extra"><a href="http://gcc.godbolt.org/#" target="_blank" class="">http://gcc.godbolt.org/#</a></div></blockquote><div class="gmail_extra"><br class=""></div><div class="gmail_extra">No, I do not have 3.4.1 but 3.5 is the current XCode release. It's pretty much already narrowed.</div></div></div></blockquote><div><br class=""></div><div>The Xcode release is from an Apple branch, which is not done at the same time as the LLVM 3.5 branch. Note the “svn” on the end of the 3.5 reference in the version info. That means that the Apple branch was done sometime between when open source 3.4 was branched and when open source 3.5 was branched.</div><div><br class=""></div><div>-Jim</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><br class=""></div><div class="gmail_extra"><blockquote style="margin:0 0 0 40px;border:none;padding:0px" class=""><div class="gmail_extra">3.4.1 generates correct assembly (except bug #2 is here as well, see below)</div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px" class=""><div class="gmail_extra">3.5 (XCode) generates correct IR and bad assembly</div></blockquote><div class="gmail_extra"><br class=""></div>So the problem seems to show up with 3.5. The attached IR is from 3.5 XCode clang -S -O3 -emit-llvm newtst.c.<br class=""></div><div class="gmail_extra"><br class=""></div><div class="gmail_extra">There are TWO bugs here. There's the Constant Hoisting bug (#1) and the failure to match a AND/CMP (#2). My current theory for #1 is that Constant Hoisting for the X86 is relatively recent or that Costing changed and that what we're seeing is that it worked correctly before. I think my proposed patch is correct and I'd recommend the ARM folks look at it.</div><div class="gmail_extra"><br class=""></div><div class="gmail_extra">I have no theory for bug #2 and I've already spent a day on it.</div></div>
<span id="cid:F33AC43C-06E6-456C-B9F4-5F1BF0C8EF2C@apple.com"><newtst.ll></span>_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:LLVMdev@cs.uiuc.edu" class="">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" class="">http://llvm.cs.uiuc.edu</a><br class=""><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" class="">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br class=""></div></blockquote></div><br class=""></body></html>