<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">It's not much.<br>
<br>
(gdb) bt<br>
#0 0x00007ffff7f6506b in ?? ()<br>
#1 0x000000000045d01a in main () at main.cc:165<br>
<br>
Line 165 is the call to the function that was compiled by the
JIT'er. Meaning that JIT'ing the function went well, but the code
or the pointer are somehow corrupt.<br>
<br>
There is no particular reason why I am working with the legacy
interface. Would you recommend to use the MCJIT interface in
general?<br>
<br>
Any ideas how to proceed here?<br>
<br>
Frank<br>
<br>
<br>
On 10/11/13 20:16, Craig Topper wrote:<br>
</div>
<blockquote
cite="mid:CAF7ks-Oa478ZTLO=a-W_baaSODJUKmPURtfTm=1J-cXkAA2=OQ@mail.gmail.com"
type="cite">
<div dir="ltr">Do you have a stack trace of the segfault?
<div><br>
</div>
<div>We have two different code emitters for X86 in LLVM. The
one used by the normal compiler and MCJIT and the other used
by the legacy JIT. All of the test cases for AVX support go
through the first one so it gets the most attention. We try to
keep the legacy JIT in sync with it, but have a history of
failing at that. The stack trace of the segfault may point to
what part is missing.</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Sun, Nov 10, 2013 at 3:32 PM, Frank
Winter <<a moz-do-not-send="true"
href="mailto:fwinter@jlab.org">fwinter@jlab.org</a>>
wrote:<br>
<blockquote class="gmail_quote">Is it possible that the AVX
support in the JIT engine or x86-64 backend<br>
is not mature? I am getting segfaults when switching from a
vector<br>
length 4 to 8 in my application. I isolated the barfing
function and it<br>
still segfaults in the minimal setup:<br>
<br>
The IR attached implements the following simple function:<br>
<br>
void bar(int start, int end, int ignore , bool add , bool
addme , float* out, float* in)<br>
{<br>
int loop_start = add ? start+add : start;<br>
int loop_end = add ? end+add : end;<br>
loop_start /= 8;<br>
loop_end /= 8;<br>
for ( int i = loop_start ; i < loop_end ; ++i )<br>
for ( int q = 0 ; q < 8 ; ++q )<br>
out[ i * 8 + q ] = in[ i * 8 + q ];<br>
}<br>
<br>
The main.cc program implements the following:<br>
<br>
Set loop vectorizer min trip count to 4<br>
Create Module from file (given as program argument)<br>
Set loop vectorizer debug info output<br>
Optimize including loop vectorization<br>
Create payload<br>
Call function<br>
Check result<br>
<br>
<br>
I tried this on various CPUs. On those which support SSE
only this program<br>
works fine (vectorized to length 4). Now, running it on a
CPU with AVX<br>
support, the loop vectorizer goes for vector length 8,
JIT'ing the function<br>
works still fine but then the call to the function suddenly
segfaults.<br>
<br>
The LLVM website says that the x86-64 backend includes
support for ISA<br>
extensions such as MMX and SSE but it doesn't say explicitly
AVX. Is this<br>
on purpose and there's no AVX support?<font color="#888888"><br>
<br>
Frank<br>
<br>
<br>
</font><br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a moz-do-not-send="true" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>
<a moz-do-not-send="true"
href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><br>
<a moz-do-not-send="true"
href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
~Craig
</div>
</blockquote>
<br>
<br>
</body>
</html>