<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">What should the test case look like? I
attach a test C file which, when compiled with -O1 using Dragonegg
and Clang yields the attached ll files. I had to hack out
Dragonegg's call to ExpandInlineAsm to get this (Clang never
attempts to call it until codegen time). -O1 is necessary for GCC
(4.6) to insert its internal implementation of htons.<br>
<br>
Then CodeGenPrepare with a TargetLowering should raise both into
llvm.bswap intrinsics; however I don't know a more elegant way to
observe that than passing -print-after-all to llc, as calling opt
-codegenprepare does so without a TargetLowering.<br>
<br>
Both dragonegg.ll and clang.ll are raised into intrinsics with my
patch; only clang.ll is without it.<br>
<br>
Chris<br>
</div>
<blockquote
cite="mid:CALehDX6NWRFDr39Ej6F7E=BvJ_MTPQuwq=nnbW_UNLDSVD+RkQ@mail.gmail.com"
type="cite">
<div dir="ltr"><br>
<br>
Compiling test.c (attached) should yield bitcode like
dragonegg-successful.ll.Looks pretty reasonable, needs a
testcase :)
<div><br>
</div>
<div>-eric</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Thu, Oct 31, 2013 at 11:49 AM, Chris
Smowton <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:chris@smowton.net" target="_blank">chris@smowton.net</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">See <a
moz-do-not-send="true"
href="http://llvm.org/bugs/show_bug.cgi?id=17757"
target="_blank">http://llvm.org/bugs/show_bug.cgi?id=17757</a>
for details; Chris Lattner advised I should cross-post the
patch here.<span class="HOEnZb"><font color="#888888"><br>
<br>
Chris<br>
</font></span><br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a moz-do-not-send="true"
href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a moz-do-not-send="true"
href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits"
target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>