[llvm-dev] error of using GATHER intrinsic

zhi chen via llvm-dev llvm-dev at lists.llvm.org
Wed Jan 20 13:33:39 PST 2016


Hi Tim,

Thanks for your response. The attached is the .bc file after my pass. I
could generate the assembly with -mcpu=skx but not with -mcpu=core-avx2.
Could you please take a look? BTW, I am using LLVM-3.7.

Best,
Zhi

On Wed, Jan 20, 2016 at 1:21 PM, Tim Northover <t.p.northover at gmail.com>
wrote:

> > Only typo that caught my eye is ‘llvm.masked.gather.v8f64’ which should
> have v2 instead of v8 to match the <2 x double>
>
> There's an extra comma after an "i1" too. But they both just result in
> LLVM rejecting the code immediately.
>
> > But it still fails if I use -mcpu=core-avx2.
>
> My simple tests get correctly expanded to scalar loads. I've still not
> seen a selection failure.
>
> > It seems that avx2 supports gather/scatter, but I am not sure why it
> doesn't work.
>
> AVX2 supports some gather instructions, but they're more limited than
> the AVX-512 variants ones @llvm.masked.gather was added for. It looks
> like you can get the AVX2 ones using x86-specific intrinsics (look for
> @llvm.x86.avx2.gather.d.pd etc in tests/CodeGen/X86).
>
> It might make sense to use the AVX2 ones for @llvm.masked.gather as
> well, but there would be more register shuffling so it might not.
> Either way, no-one seems to have done so yet.
>
> Cheers.
>
> Tim.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160120/ee3621c9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_opt.bc
Type: application/octet-stream
Size: 3100 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160120/ee3621c9/attachment.obj>


More information about the llvm-dev mailing list