<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">So we have a bug in <span style="color: rgb(52, 149, 175); font-family: Menlo; font-size: 11px; ">canSinkOrHoistInst</span>  because it only checks for memory deps.<br><div><br></div><div><br><div><div>On Sep 9, 2012, at 8:39 AM, Duncan Sands <<a href="mailto:baldrick@free.fr">baldrick@free.fr</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi Nadav,<br><br>On 08/09/12 22:51, Nadav Rotem wrote:<br><blockquote type="cite"><br>On Aug 19, 2012, at 2:55 PM, "Kuperstein, Michael M"<br><<a href="mailto:michael.m.kuperstein@intel.com">michael.m.kuperstein@intel.com</a> <<a href="mailto:michael.m.kuperstein@intel.com">mailto:michael.m.kuperstein@intel.com</a>>> wrote:<br><br><blockquote type="cite">Hello,<br>Currently, llvm::isSafeToSpeculativelyExecute() always returns false for Call<br>instructions.<br>This has actual performance implications, because loop-invariant code motion<br>makes this check, and will never hoist instructions that are not safe to<br>speculatively execute.<br></blockquote><br>LICM::canSinkOrHoistInst has special handling for hoisting Call Instructiobns.<br>  It looks like readonly functions should be hoisted. Do you have test cases<br>which fail ?<br></blockquote><br>a readonly/readnone function may contain divide by zero.<br><br>Ciao, Duncan.<br>_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></blockquote></div><br></div></body></html>