[llvm-commits] [llvm] r76684 - /llvm/trunk/include/llvm/IntrinsicsX86.td

Evan Cheng evan.cheng at apple.com
Tue Jul 21 16:59:15 PDT 2009


Hi Eric,

Eli is correct. Please add code to lower it to an insertelement.

See config/i386/llvm-i386.cpp:

   case IX86_BUILTIN_VEC_SET_V4HI:
   case IX86_BUILTIN_VEC_SET_V8HI:
     // GCC sometimes doesn't produce the right element type.
     Ops[1] = Builder.CreateIntCast(Ops[1], Type::Int16Ty, false,  
"tmp");
     Result = Builder.CreateInsertElement(Ops[0], Ops[1], Ops[2],  
"tmp");
     return true;

Evan

On Jul 21, 2009, at 4:51 PM, Eric Christopher wrote:

>
> On Jul 21, 2009, at 4:47 PM, Eli Friedman wrote:
>
>> On Tue, Jul 21, 2009 at 4:43 PM, Eric
>> Christopher<echristo at apple.com> wrote:
>>> Author: echristo
>>> Date: Tue Jul 21 18:43:14 2009
>>> New Revision: 76684
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=76684&view=rev
>>> Log:
>>> Add intrinsic for __builtin_ia32_vec_set_v4si which turns out to be
>>> pinsrd in sse4.1.
>>
>> pinsrd == insertelement <4 x i32> %vec, i32 %val, i32 %index.
>> llvm-gcc should be lowering this.
>
> Interesting. Shouldn't be much different than the i8 for pinsrb
> (though I noticed that the quad version is also missing). Guess it
> could be lowered though along with all of the other assorteds.
> Thoughts?
>
> -eric
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list