<div dir="ltr">Hi Frank, Stefan,<div><br></div><div>> I am not certain, but I'd assume yes. I used AVX in a JIT many years ago in an experimental project. I see no reason why AVX2 wouldn't be available in ORC.</div><div><br></div><div>I agree: ORC really only touches the compiler to set it up, so as long as the target machine is set up correctly this should "Just Work".</div><div><br></div><div>It might be worth stepping through the call to createTargetMachine in <a href="https://github.com/llvm/llvm-project/blob/76a1a415302d06ceb4a3358493e897e98dd75f77/llvm/lib/ExecutionEngine/Orc/JITTargetMachineBuilder.cpp#L51">https://github.com/llvm/llvm-project/blob/76a1a415302d06ceb4a3358493e897e98dd75f77/llvm/lib/ExecutionEngine/Orc/JITTargetMachineBuilder.cpp#L51</a> to see whether the CPU and AVX feature flags are being handled as expected.</div><div><br></div><div>-- Lang.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 31, 2021 at 8:48 PM Stefan Gränitz via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div>
<p>
</p><blockquote type="cite">Should I switch to LLVM 13 release or is
avx2 in JIT a trusted feature to be present in version 12?</blockquote>
I am not certain, but I'd assume yes. I used AVX in a JIT many
years ago in an experimental project. I see no reason why AVX2
wouldn't be available in ORC.<br>
<br>
Did you check with the results of sys::getHostCPUFeatures()?
There's lots of AVX variants:<br>
<a href="https://github.com/llvm/llvm-project/blob/76a1a415302d06ceb4a3358493e897e98dd75f77/llvm/lib/Support/Host.cpp#L1499" target="_blank">https://github.com/llvm/llvm-project/blob/76a1a415302d06ceb4a3358493e897e98dd75f77/llvm/lib/Support/Host.cpp#L1499</a><br>
<br>
And maybe have a look how it works in JITTargetMachineBuilder:<br>
<a href="https://github.com/llvm/llvm-project/blob/76a1a415302d06ceb4a3358493e897e98dd75f77/llvm/lib/ExecutionEngine/Orc/JITTargetMachineBuilder.cpp#L24" target="_blank">https://github.com/llvm/llvm-project/blob/76a1a415302d06ceb4a3358493e897e98dd75f77/llvm/lib/ExecutionEngine/Orc/JITTargetMachineBuilder.cpp#L24</a><br>
<br>
<p></p>
<div>On 31/08/2021 00:57, Frank Winter
wrote:<br>
</div>
<blockquote type="cite">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hi Stefan.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Thanks for the tip. But, it didn't do the trick - still only
SSE. (the /proc/cpuinfo contains flag 'avx2')
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I instrumented a bit:<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
JITTargetMachineBuilder JTMB((*TPC)->getTargetTriple());
<div><br>
</div>
<div> llvm::outs() << "feature string: " <<
JTMB.getFeatures().getString() << "\n";</div>
<div> llvm::outs() << "adding features...\n";</div>
<div> JTMB.addFeatures({"+avx2"});</div>
<div> </div>
<span> llvm::outs() << "feature string: " <<
JTMB.getFeatures().getString() << "\n";</span><br>
</div>
<div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Output:<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Creating JIT
<div>feature string: </div>
<div>adding features...</div>
<div>feature string: +avx2</div>
Creating JIT successfu</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
But still only SSE:<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
.Leval0_intern:
<div>.cfi_startproc</div>
<div>addl %esi, %edi</div>
<div>shll $3, %edi</div>
<div>movslq %edi, %rax</div>
<div>shlq $5, %rax</div>
<div>movaps (%r8,%rax), %xmm0</div>
<div>movaps 16(%r8,%rax), %xmm1</div>
<div>mulps 16(%rcx,%rax), %xmm1</div>
<div>mulps (%rcx,%rax), %xmm0</div>
<div>movaps %xmm0, (%rdx,%rax)</div>
<div>movaps %xmm1, 16(%rdx,%rax)</div>
<span>retq</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Should I switch to LLVM 13 release or is avx2 in JIT a trusted
feature to be present in version 12?</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Best,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Frank</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_8094047247352591354divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b>
Stefan Gränitz <a href="mailto:stefan.graenitz@gmail.com" target="_blank"><stefan.graenitz@gmail.com></a><br>
<b>Sent:</b> Monday, August 30, 2021 5:00 PM<br>
<b>To:</b> Frank Winter <a href="mailto:fwinter@jlab.org" target="_blank"><fwinter@jlab.org></a>; Craig
Topper <a href="mailto:craig.topper@gmail.com" target="_blank"><craig.topper@gmail.com></a><br>
<b>Cc:</b> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank"><llvm-dev@lists.llvm.org></a><br>
<b>Subject:</b> Re: [llvm-dev] [EXTERNAL] Re: ORC JIT error
when using AVX2 vector instructions</font>
<div> </div>
</div>
<div>
<p style="margin-top:0px;margin-bottom:0px">Hi Frank<br>
<br>
</p>
<blockquote type="cite">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
That makes me think that the ORC JIT Kaleidoscope doesn't
use the '+avx2' attribute.<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
How can ORC JIT Kaleidoscope generate jitted code with
AVX2 instructions?</div>
</blockquote>
Did you try adding something like:<br>
JTMB.addFeatures({"+avx2"});<br>
<br>
Here?<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_llvm_llvm-2Dproject_blob_7a2a765745973ebeb041276d2d9489a000ba9371_llvm_examples_Kaleidoscope_BuildingAJIT_Chapter1_KaleidoscopeJIT.h-23L71&d=DwMD-g&c=CJqEzB1piLOyyvZjb8YUQw&r=tFpAzszScTWMAFcrGFW5xg&m=d7g1B6MAn9hV6ijrMKBgXHMYCQjKMfXQcxFZUzXsIIE&s=1xpxLmfuaVlN3_P_Uw-FHKkrxSRG2uXXxT44bMGkOWA&e=" target="_blank">https://github.com/llvm/llvm-project/blob/7a2a765745973ebeb041276d2d9489a000ba9371/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h#L71</a><br>
<br>
Hope it helps.<br>
Best, Stefan<br>
<br>
<div>On 30/08/2021 21:46, Frank
Winter via llvm-dev wrote:<br>
</div>
<blockquote type="cite">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Thanks! Yeah, that was my silliness. Fixed and the module
compiles now with ORC JIT Kaleidoscope.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
However, looking at the assembler I only see SSE (128 bit
vectors) being generated:</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
.Leval0_intern:
<div>.cfi_startproc</div>
<div>addl %esi, %edi</div>
<div>shll $3, %edi</div>
<div>movslq %edi, %rax</div>
<div>shlq $5, %rax</div>
<div>movaps (%r8,%rax), %xmm0</div>
<div>movaps 16(%r8,%rax), %xmm1</div>
<div>mulps 16(%rcx,%rax), %xmm1</div>
<div>mulps (%rcx,%rax), %xmm0</div>
<div>movaps %xmm0, (%rdx,%rax)</div>
<div>movaps %xmm1, 16(%rdx,%rax)</div>
<span>retq</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I cross checked what LLC gives:</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Calling llc with no optional flags gives matching
assembler, but when adding '-mattr=+avx2' I get AVX2 (256
bit vectors)<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
.Leval0_intern: # @eval0_intern
<div> .cfi_startproc</div>
<div># %bb.0: # %stack</div>
<div> addl %esi, %edi</div>
<div> shll $3, %edi</div>
<div> movslq %edi, %rax</div>
<div> shlq $5, %rax</div>
<div> vmovaps (%r8,%rax), %ymm0</div>
<div> vmulps (%rcx,%rax), %ymm0, %ymm0</div>
<div> vmovaps %ymm0, (%rdx,%rax)</div>
<div> vzeroupper</div>
<span> retq</span><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
That makes me think that the ORC JIT Kaleidoscope doesn't
use the '+avx2' attribute.<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
How can ORC JIT Kaleidoscope generate jitted code with
AVX2 instructions?<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Thanks again & Best wishes,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Frank</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_8094047247352591354x_divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Craig Topper
<a href="mailto:craig.topper@gmail.com" target="_blank"><craig.topper@gmail.com></a><br>
<b>Sent:</b> Monday, August 30, 2021 3:20 PM<br>
<b>To:</b> Frank Winter <a href="mailto:fwinter@jlab.org" target="_blank">
<fwinter@jlab.org></a><br>
<b>Cc:</b> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">
llvm-dev@lists.llvm.org</a> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">
<llvm-dev@lists.llvm.org></a><br>
<b>Subject:</b> [EXTERNAL] Re: [llvm-dev] ORC JIT
error when using AVX2 vector instructions</font>
<div> </div>
</div>
<div>
<div dir="ltr">This is an illegal instruction. mul is an
integer operation, but that has floating point types.
The correct operation would be fmul.
<div><br>
</div>
<div><span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">%21 = mul <8 x float> %20,
%10</span><br>
</div>
<div><br clear="all">
<div>
<div dir="ltr">~Craig</div>
</div>
<br>
</div>
</div>
<br>
<div>
<div dir="ltr">On Mon, Aug 30,
2021 at 12:08 PM Frank Winter via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>>
wrote:<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hi.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
As soon as the module contains instructions
operating on < 8 x float > the ORC JIT
refuses to work.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Here's the module that provokes the error given
further below: <br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
; ModuleID = 'module'
<div>source_filename = "module"</div>
<div>target datalayout =
"e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"</div>
<div><br>
</div>
<div>define private void @eval0_intern(i32
%arg0, i32 %arg1, <8 x float>* %arg2,
<8 x float>* %arg3, <8 x float>*
%arg4) {</div>
<div>stack:</div>
<div> br label %afterstack</div>
<div><br>
</div>
<div>afterstack:
; preds = %stack</div>
<div> %0 = add nsw i32 %arg0, %arg1</div>
<div> %1 = add nsw i32 0, %0</div>
<div> %2 = mul i32 %1, 1</div>
<div> %3 = add nsw i32 %2, 0</div>
<div> %4 = mul i32 %3, 1</div>
<div> %5 = add nsw i32 %4, 0</div>
<div> %6 = mul i32 %5, 1</div>
<div> %7 = add nsw i32 %6, 0</div>
<div> %8 = mul i32 %7, 8</div>
<div> %9 = getelementptr <8 x float>,
<8 x float>* %arg3, i32 %8</div>
<div> %10 = load <8 x float>, <8 x
float>* %9, align 32</div>
<div> %11 = add nsw i32 0, %0</div>
<div> %12 = mul i32 %11, 1</div>
<div> %13 = add nsw i32 %12, 0</div>
<div> %14 = mul i32 %13, 1</div>
<div> %15 = add nsw i32 %14, 0</div>
<div> %16 = mul i32 %15, 1</div>
<div> %17 = add nsw i32 %16, 0</div>
<div> %18 = mul i32 %17, 8</div>
<div> %19 = getelementptr <8 x float>,
<8 x float>* %arg4, i32 %18</div>
<div> %20 = load <8 x float>, <8 x
float>* %19, align 32</div>
<div> %21 = mul <8 x float> %20, %10</div>
<div> %22 = add nsw i32 0, %0</div>
<div> %23 = mul i32 %22, 1</div>
<div> %24 = add nsw i32 %23, 0</div>
<div> %25 = mul i32 %24, 1</div>
<div> %26 = add nsw i32 %25, 0</div>
<div> %27 = mul i32 %26, 1</div>
<div> %28 = add nsw i32 %27, 0</div>
<div> %29 = mul i32 %28, 8</div>
<div> %30 = getelementptr <8 x float>,
<8 x float>* %arg2, i32 %29</div>
<div> store <8 x float> %21, <8 x
float>* %30, align 32</div>
<div> ret void</div>
<div>}</div>
<div><br>
</div>
<div>define void @eval0(i32 %idx, [8 x i8]*
%arg_ptr) {</div>
<div>entrypoint:</div>
<div> %0 = getelementptr [8 x i8], [8 x i8]*
%arg_ptr, i32 0</div>
<div> %1 = bitcast [8 x i8]* %0 to i32*</div>
<div> %2 = load i32, i32* %1, align 4</div>
<div> %3 = getelementptr [8 x i8], [8 x i8]*
%arg_ptr, i32 1</div>
<div> %4 = bitcast [8 x i8]* %3 to <8 x
float>**</div>
<div> %5 = load <8 x float>*, <8 x
float>** %4, align 8</div>
<div> %6 = getelementptr [8 x i8], [8 x i8]*
%arg_ptr, i32 2</div>
<div> %7 = bitcast [8 x i8]* %6 to <8 x
float>**</div>
<div> %8 = load <8 x float>*, <8 x
float>** %7, align 8</div>
<div> %9 = getelementptr [8 x i8], [8 x i8]*
%arg_ptr, i32 3</div>
<div> %10 = bitcast [8 x i8]* %9 to <8 x
float>**</div>
<div> %11 = load <8 x float>*, <8 x
float>** %10, align 8</div>
<div> call void @eval0_intern(i32 %idx, i32 %2,
<8 x float>* %5, <8 x float>* %8,
<8 x float>* %11)</div>
<div> ret void</div>
<div>}</div>
<div>--------------------------</div>
<div><br>
</div>
<div><br>
</div>
<div>For the JIT part I'm using the Kaleidoscope
ORC JIT as given in the LLVM examples.
However, when it comes to the symbol lookup
the program stops with output like this:<br>
</div>
<div><br>
</div>
Lookup
<div>LLVM ERROR: Cannot select: 0x562e8bb6c268:
v4f32 = mul 0x562e8bb6bab0, 0x562e8bb6b6a0</div>
<div> 0x562e8bb6bab0: v4f32,ch = load<(load
16 from %ir.19 + 16, basealign 32)>
0x562e8baf8ca8, 0x562e8bb6c130, undef:i64</div>
<div> 0x562e8bb6c130: i64 = add nuw
0x562e8bb6bcb8, Constant:i64<16></div>
<div> 0x562e8bb6bcb8: i64 = add
0x562e8bb6bc50, 0x562e8bb6b9e0</div>
<div> 0x562e8bb6bc50: i64,ch =
CopyFromReg 0x562e8baf8ca8, Register:i64 %4</div>
<div> 0x562e8bb6bbe8: i64 = Register %4</div>
<div> 0x562e8bb6b9e0: i64 = shl
0x562e8bb6b910, Constant:i8<5></div>
<div> 0x562e8bb6b910: i64 = sign_extend
0x562e8bb6b770</div>
<div> 0x562e8bb6b770: i32 = shl
0x562e8bb6b500, Constant:i8<3></div>
<div> 0x562e8bb6b500: i32 = add nsw
0x562e8bb6b3c8, 0x562e8bb6b498</div>
<div> 0x562e8bb6b3c8: i32,ch =
CopyFromReg 0x562e8baf8ca8, Register:i32 %0</div>
<div> 0x562e8bb6b360: i32 =
Register %0</div>
<div> 0x562e8bb6b498: i32,ch =
CopyFromReg 0x562e8baf8ca8, Register:i32 %1</div>
<div> 0x562e8bb6b430: i32 =
Register %1</div>
<div> 0x562e8bb6ea28: i8 =
Constant<3></div>
<div> 0x562e8bb6c2d0: i8 =
Constant<5></div>
<div> 0x562e8bb6b638: i64 =
Constant<16></div>
<div> 0x562e8bb6bb18: i64 = undef</div>
<div> 0x562e8bb6b6a0: v4f32,ch = load<(load
16 from %ir.9 + 16, basealign 32)>
0x562e8baf8ca8, 0x562e8bb6c198, undef:i64</div>
<div> 0x562e8bb6c198: i64 = add nuw
0x562e8bb6ba48, Constant:i64<16></div>
<div> 0x562e8bb6ba48: i64 = add
0x562e8bb6b8a8, 0x562e8bb6b9e0</div>
<div> 0x562e8bb6b8a8: i64,ch =
CopyFromReg 0x562e8baf8ca8, Register:i64 %3</div>
<div> 0x562e8bb6b840: i64 = Register %3</div>
<div> 0x562e8bb6b9e0: i64 = shl
0x562e8bb6b910, Constant:i8<5></div>
<div> 0x562e8bb6b910: i64 = sign_extend
0x562e8bb6b770</div>
<div> 0x562e8bb6b770: i32 = shl
0x562e8bb6b500, Constant:i8<3></div>
<div> 0x562e8bb6b500: i32 = add nsw
0x562e8bb6b3c8, 0x562e8bb6b498</div>
<div> 0x562e8bb6b3c8: i32,ch =
CopyFromReg 0x562e8baf8ca8, Register:i32 %0</div>
<div> 0x562e8bb6b360: i32 =
Register %0</div>
<div> 0x562e8bb6b498: i32,ch =
CopyFromReg 0x562e8baf8ca8, Register:i32 %1</div>
<div> 0x562e8bb6b430: i32 =
Register %1</div>
<div> 0x562e8bb6ea28: i8 =
Constant<3></div>
<div> 0x562e8bb6c2d0: i8 =
Constant<5></div>
<div> 0x562e8bb6b638: i64 =
Constant<16></div>
<span> 0x562e8bb6bb18: i64 = undef</span><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
The module compiles fine with LLC. So, I assume
that's not the problem.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
What might go wrong? Is there a way to
initialize the ORC JIT with the AVX2 option
somehow?<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
This is using LLVM release 12.<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Best,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Frank</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
</div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_llvm-2Ddev&d=DwMFaQ&c=CJqEzB1piLOyyvZjb8YUQw&r=tFpAzszScTWMAFcrGFW5xg&m=iIRT39rMHzg60BQQu6bv5Nzez97Rjf-90P-EHloWvtk&s=BpFT2lRfi7rhmDGQWAkBbHAKDe_9xPQKggZyX5VciuY&e=" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
LLVM Developers mailing list
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>
<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_llvm-2Ddev&d=DwMD-g&c=CJqEzB1piLOyyvZjb8YUQw&r=tFpAzszScTWMAFcrGFW5xg&m=d7g1B6MAn9hV6ijrMKBgXHMYCQjKMfXQcxFZUzXsIIE&s=DFuYQvPLbEIViF8vTqwviU6LTKF7Qqjl8lhzJPVqUKY&e=" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
<pre cols="72">--
<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__weliveindetail.github.io_blog_about_&d=DwMD-g&c=CJqEzB1piLOyyvZjb8YUQw&r=tFpAzszScTWMAFcrGFW5xg&m=d7g1B6MAn9hV6ijrMKBgXHMYCQjKMfXQcxFZUzXsIIE&s=bLfQtGMxBwWMWB3Eu_i92l-Fz8PNxn3xDCGrg-JxRNQ&e=" target="_blank">https://weliveindetail.github.io/blog/about/</a></pre>
</div>
</div>
</blockquote>
<pre cols="72">--
<a href="https://weliveindetail.github.io/blog/about/" target="_blank">https://weliveindetail.github.io/blog/about/</a></pre>
</div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>