[LLVMdev] Cannot split vector result of AVX intrinsic _mm256_rsqrt_ps

Sanjay Patel spatel at rotateright.com
Tue Jan 6 09:59:54 PST 2015


Steven's problem sounds similar to:
http://llvm.org/bugs/show_bug.cgi?id=19416

The cpu/feature flags aren't being passed through correctly with -flto?

In bug 17909, the run script shows "-target-cpu core2" for code that
includes AVX.

Is this expected behavior?

$ cat avx.ll
define <4 x double> @wrap_a_round(<4 x double> %a) {
  %round = tail call <4 x double> @llvm.x86.avx.round.pd.256(<4 x double>
%a, i32 0)
  ret <4 x double> %round
}

declare <4 x double> @llvm.x86.avx.round.pd.256(<4 x double>, i32)

$ ./llc -mcpu=core2 avx.ll
SplitVectorResult #0: 0x7fdc29849970: v4f64 = llvm.x86.avx.round.pd.256
0x7fdc29849750, 0x7fdc29849640, 0x7fdc29849860 [ORD=2] [ID=0]

LLVM ERROR: Do not know how to split the result of this operator!



On Sat, Dec 13, 2014 at 5:49 PM, Craig Topper <craig.topper at gmail.com>
wrote:

> This sounds like the somehow the frontend is allowing the intrinsic to be
> used but the backend thinks it not legal and is trying to split the vector
> type to a legal type.
>
> Can you provide your source and command line.
>
> On Sat, Dec 13, 2014 at 2:17 PM, Steven Noonan <steven at uplinklabs.net>
> wrote:
>>
>> I'm getting this on LLVM trunk:
>>
>> SplitVectorResult #0: 0x27e6250: v8f32 = llvm.x86.avx.rsqrt.ps.256
>> 0x2739310, 0x2739420 [ORD=16] [ID=0]
>> LLVM ERROR: Do not know how to split the result of this operator!
>> clang: error: linker command failed with exit code 1 (use -v to see
>> invocation)
>>
>> Oddly, when I build the same code without -flto I don't see this issue.
>>
>> I see a similar bug was reported over a year ago and has had no
>> activity (though it doesn't use LTO):
>> http://llvm.org/bugs/show_bug.cgi?id=17909
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>
>
>
> --
> ~Craig
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150106/89bf9a54/attachment.html>


More information about the llvm-dev mailing list