search for: createvectorsplat

Displaying 3 results from an estimated 3 matches for "createvectorsplat".

2015 May 04
2
[LLVMdev] Load value and broadcast in LLVM
...re instructions. I was wondering if there was a cheaper way to do it. Best, Zhi On Mon, May 4, 2015 at 2:12 AM, Shahid, Asghar-ahmad < Asghar-ahmad.Shahid at amd.com> wrote: > Hi Zhi, > > > > If I get your question correctly, Yes, you can do it by using the > IRBuilder’s CreateVectorSplat() API. > > > > /// \brief Return a vector value that contains \arg V broadcasted to \p > > /// NumElts elements. > > Value *CreateVectorSplat(unsigned NumElts, Value *V, const Twine &Name = > "") > > > > For your case, here the Value V will...
2015 Jul 09
2
[LLVMdev] Extracting a splat value from vector instruction.
Hi, We have a function in IRBuilder.h Value *CreateVectorSplat(unsigned NumElts, Value *V, const Twine &Name = "") { .. } This function creates 2 instructions - "insertelement" and "shuffle" with all-zero mask. Now I want to add Value *getSplatValue(Value *Val). This function will try to recognize the pattern - insertelement...
2015 May 04
4
[LLVMdev] Load value and broadcast in LLVM
Is it possible to load a value into a vector register and broadcast it in LLVM? For example, for the following address %x %x = getelementptr inbounds %struct._Ray* %ray, i32 0, i32 0, i32 0 instead of loading the value at %x into a scalar register %0: %0 = load double* %x, align 4, !tbaa !0 I want to load it into a <2 x double> vector register %1 and make both of the two elements in %1