On Sun, Jul 10, 2011 at 6:49 PM, Chris Lattner <span dir="ltr"><<a href="mailto:clattner@apple.com" target="_blank">clattner@apple.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div style="word-wrap:break-word"><div><br><div><div>On Jul 10, 2011, at 4:48 AM, arrowdodger wrote:</div><br><blockquote type="cite">When compiling <a href="http://llvm.org/svn/llvm-project/klee/trunk/runtime/Intrinsic/memset.c" target="_blank">http://llvm.org/svn/llvm-project/klee/trunk/runtime/Intrinsic/memset.c</a> with -O2, LoopIdiomRecognizer pass inserts memset intrinsic into function body. It causes recursion during execution in klee. Attached patch fixes this.<br>


</blockquote><br></div></div><div>Hi arrowdodger,</div><div><br></div><div>System code is supposed to build with -fno-builtin.  If clang is using the LLVM passes directly, it can set up a TargetLoweringInfo instance that disables these transformations.</div>


<div><br></div><div>-Chris</div><br></div>
</blockquote></div><br>I've added -fno-builtin to the compile line and it worked, thanks. Patch is obviously irrelevant now, but you could've pointed me to that flag yesterday in irc, so i would save one day. =\<br>