Displaying 20 results from an estimated 32 matches for "insertelementinst".
2014 Jul 20
2
[LLVMdev] error in InsertElementInst
Hello everybody,
What I am trying to do is to create a vector <4 x i32> and save some values to initialize the vector.
However, I am using the insertElementInst() and the errors I get are the following;
error: within this context
Instruction *Insert = new InsertElementInst(instr, emptyVec, index0, "test");
and
error: ‘llvm::InsertElementInst::InsertElementInst(llvm::Value*, llvm::Value*, llvm::Value*, const llvm::Twine&, llvm::Instruction*)’...
2015 Apr 16
3
[LLVMdev] double* to <2 x double>*
...d(0);
Type *vecTy = VectorType::get(Type::getDoublePtrTy(currF->getContext()), 2);
Value *emptyVec = UndefValue::get(vecTy);
Type* u32Ty = Type::getInt32Ty(currF->getContext());
Value *index0 = ConstantInt::get(u32Ty, 0);
Value *index1 = ConstantInt::get(u32Ty, 1);
Instruction *InsertVal = InsertElementInst::Create(emptyVec, loadValue,
index0, "");
InsertVal = InsertElementInst::Create(emptyVec, loadValue, index1, "");
InsertVal->insertBefore(pInst);
It turned out that the way I am doing is not right because the output is <2
x double*>. Any help will be appreciated!
BTW,...
2014 Jul 22
2
[LLVMdev] InsertElementInst and ExtractElementInst
...x i32> undef, i32 %43, i32 2
%extract4 = extractelement <3 x i32> undef, i32 %35
...
store i32 %extract4, i32* %46, align 4
The output of my program is different that the expected one, like the
extractelement takes an undefined value.
The instructions I used are:
Instruction *Insert0 = InsertElementInst::Create(vector, Or_set, index0,
"ins or");
..
Instruction *extract = ExtractElementInst::Create(vector, ch,
"extract"); //where ch takes a value from 0 to 2
instr->replaceAllUsesWith(extract); //where I want to replace the instr
instruction with the instruction from the ve...
2012 Apr 23
4
[LLVMdev] gdb + clang/llvm
...rogram: /home/rleissa/projects/test/build_debug/Debug+Asserts+Checks/bin/clang -std=c++11 simple.cpp
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
test
clang: /home/rleissa/projects/test/llvm/lib/VMCore/Instructions.cpp:1475: llvm::InsertElementInst::InsertElementInst(llvm::Value*, llvm::Value*, llvm::Value*, const llvm::Twine&, llvm::Instruction*): Assertion `isValidOperands(Vec, Elt, Index) && "Invalid insertelement instruction operands!"' failed.
0 libLLVM-3.2svn.so 0x00007ffff686f9bd
1 libLLVM-3.2svn.so 0x00007f...
2012 Apr 23
0
[LLVMdev] gdb + clang/llvm
...a/projects/test/build_debug/Debug+Asserts+Checks/bin/clang -std=c++11 simple.cpp
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/libthread_db.so.1".
> test
> clang: /home/rleissa/projects/test/llvm/lib/VMCore/Instructions.cpp:1475: llvm::InsertElementInst::InsertElementInst(llvm::Value*, llvm::Value*, llvm::Value*, const llvm::Twine&, llvm::Instruction*): Assertion `isValidOperands(Vec, Elt, Index) && "Invalid insertelement instruction operands!"' failed.
> 0 libLLVM-3.2svn.so 0x00007ffff686f9bd
> 1 libLLVM-3.2svn.s...
2012 Apr 23
1
[LLVMdev] gdb + clang/llvm
...in/clang
> > -std=c++11 simple.cpp
> > [Thread debugging using libthread_db enabled]
> > Using host libthread_db library "/lib/libthread_db.so.1".
> > test
> > clang:
> > /home/rleissa/projects/test/llvm/lib/VMCore/Instructions.cpp:1475:
> > llvm::InsertElementInst::InsertElementInst(llvm::Value*,
> > llvm::Value*, llvm::Value*, const llvm::Twine&,
> > llvm::Instruction*): Assertion `isValidOperands(Vec, Elt, Index)
> > && "Invalid insertelement instruction operands!"' failed.
> > 0 libLLVM-3.2svn.so 0x00007f...
2012 Apr 23
0
[LLVMdev] gdb + clang/llvm
On Apr 20, 2012, at 6:35 PM, Roland Leißa <leissa at cs.uni-saarland.de> wrote:
> ok, I now have a problem in the code generator.
> Let's say I want to set a breakpoint somewhere in
> clang/lib/CodeGen/CGExprScalar.cpp
>
> What do I have to do in order to trigger breakpoints, see backtraces and so on?
You set a breakpoint and ask to see a backtrace?
-eric
2012 Apr 21
2
[LLVMdev] gdb + clang/llvm
ok, I now have a problem in the code generator.
Let's say I want to set a breakpoint somewhere in
clang/lib/CodeGen/CGExprScalar.cpp
What do I have to do in order to trigger breakpoints, see backtraces and so on?
--
Roland
----- Original Message -----
> From: "Eric Christopher" <echristo at apple.com>
> To: "Roland Leißa" <leissa at cs.uni-saarland.de>
2015 Apr 17
2
[LLVMdev] how to use "new instruction()"
...&*pInst);
Type *vecTy = VectorType::get(Type::getDoubleTy(ctxt), 2);
Value *emptyVec = UndefValue::get(vecTy);
Type* u32Ty = Type::getInt32Ty(currF->getContext());
Value *index0 = ConstantInt::get(u32Ty, 0);
Value *index1 = ConstantInt::get(u32Ty, 1);
Instruction *InsertVal = InsertElementInst::Create(emptyVec, oprnd,
index0, "insert");
InsertVal = InsertElementInst::Create(emptyVec, oprnd, index1, "insert");
vecVal = builder.CreateFAdd(emptyVec, emptyVec, "");
Best,
Zhi
On Fri, Apr 17, 2015 at 12:17 PM, Nick Lewycky <nicholas at mxc.ca> wrote...
2009 May 17
1
[LLVMdev] [patch] Remove getType() overrides from extractvalue and insertvalue
Several instruction classes override getType() when the instruction
always creates a particular type of value. For example, the result of
insertelement is always a vector, so InsertElementInst overrides
getType() to return a VectorType*. This makes perfect sense.
However, ExtractValueInst and InsertValueInst override getType() to
return a PointerType*, which does not make sense and is in fact never
correct for the latter instruction; this is probably a relic of an
oversight...
2008 Apr 06
0
[LLVMdev] [HEADS-UP] API changes for <class Use> size reduction.
...uot;*.cpp"`)
...
end
The other classes off the top of my head:
setenv CLASS Function
setenv CLASS SwitchInst
setenv CLASS PHINode
setenv CLASS BranchInst
setenv CLASS CallInst
setenv CLASS ReturnInst
setenv CLASS InvokeInst
setenv CLASS GetElementPtrInst
setenv CLASS SelectInst
setenv CLASS InsertElementInst
There are some false substitutions that arise this way, but it mostly
works. Be sure
to recompile.
Below I give an (marginally tested) monster script that should
transform all these classes at once
in your whole tree. Be sure to only use it on a tree without
modifications!
Unfortunately th...
2014 Mar 17
2
[LLVMdev] Improving SLPVectorizer for Julia
I'm working on some small improvements to SLPVectorizer.cpp so that it can deal with some tuple operations arising from Julia code. Being fairly new to LLVM, I could use some advice, particular from those familiar with the internals of SLPVectorizer.
The motivation can be found in the Julia discussion https://github.com/JuliaLang/julia/issues/5857 . Here is an example of the kind of LLVM
2007 Jul 20
5
[LLVMdev] Seg faulting on vector ops
...alue* makeVector(Value* s, unsigned int dim, BasicBlock* basicBlock)
{
AllocaInst* pV = new
AllocaInst(VectorType::get(Type::FloatTy,dim),"pv",basicBlock);
Value* v = new LoadInst(pV,"v",basicBlock);
for (unsigned int i = 0 ; i < dim ; ++i)
v = new InsertElementInst(v,s,i,"v",basicBlock);
return v;
}
Function* generateVectorAndSelect(Module* pModule)
{
std::vector<Type const*> params;
params.push_back(Type::FloatTy);
FunctionType* funcType =
FunctionType::get(Type::FloatTy,params,NULL);
Function* func =
c...
2011 Dec 02
1
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...+ // candidate chains where longer chains are considered to be better.
>>> + // Note: when this function returns 0, the resulting instructions are
>>> + // not actually fused.
>>> + static inline size_t getDepthFactor(Value *V) {
>>> + if (isa<InsertElementInst>(V) || isa<ExtractElementInst>(V)) {
>>
>> Why have InsertElementInst, ExtractElementInst instructions a weight of
>> zero?
>
> Two reasons: First, they cannot be usefully fused. Second, because the
> pass generates a lot of these, they can confuse the simple met...
2008 Mar 29
5
[LLVMdev] stack alignment (again)
...byte aligned, so instructions like unpcklps xmm1,
dword ptr [eps] cause grief. My AllocaInstr instructions are told to be
16 byte aligned, so the addition of a 4-byte parameter shouldn't have
changed alignment on the objects.
The unpcklps instruction is coming from an ExtractElementInst or
InsertElementInst. I can always hard code these by cyling my vectors to
memory and doing things one scalar at a time, though perf will suffer.
I'll try it Monday to see if it gets rid of the alignment sensitive
instructions.
I'm noticing this under windows via JIT. I'm going to check to see if
my m...
2007 Jul 21
0
[LLVMdev] Seg faulting on vector ops
...ck* basicBlock)
>
> {
>
> AllocaInst* pV = new
> AllocaInst(VectorType::get(Type::FloatTy,dim),"pv",basicBlock);
>
> Value* v = new LoadInst(pV,"v",basicBlock);
>
>
>
> for (unsigned int i = 0 ; i < dim ; ++i)
>
> v = new InsertElementInst(v,s,i,"v",basicBlock);
>
>
>
> return v;
>
> }
>
>
>
> Function* generateVectorAndSelect(Module* pModule)
>
> {
>
> std::vector<Type const*> params;
>
>
>
> params.push_back(Type::FloatTy);
>
>
>
> Functio...
2007 Jul 24
2
[LLVMdev] Seg faulting on vector ops
...; AllocaInst* pV = new
>> AllocaInst(VectorType::get(Type::FloatTy,dim),"pv",basicBlock);
>>
>> Value* v = new LoadInst(pV,"v",basicBlock);
>>
>>
>>
>> for (unsigned int i = 0 ; i < dim ; ++i)
>>
>> v = new InsertElementInst(v,s,i,"v",basicBlock);
>>
>>
>>
>> return v;
>>
>> }
>>
>>
>>
>> Function* generateVectorAndSelect(Module* pModule)
>>
>> {
>>
>> std::vector<Type const*> params;
>>
>>
>>
>...
2012 Jul 31
0
[LLVMdev] rotate
Oh, no. I should have been more clear. The patch was not rejected, just
lost in the daily shuffle.
I already have my employer's approval to send this upstream, so I will
prepare a patch against trunk this morning.
> I proposed a similar patch to LLVM (left circular shift) around 10/2011.
> > Parts of my patch did make it into trunk about a year after, but others
> > did not.
2007 Jul 20
0
[LLVMdev] Seg faulting on vector ops
...sicBlock)
>
> {
>
> AllocaInst* pV = new AllocaInst(VectorType::get
> (Type::FloatTy,dim),"pv",basicBlock);
>
> Value* v = new LoadInst(pV,"v",basicBlock);
>
>
>
> for (unsigned int i = 0 ; i < dim ; ++i)
>
> v = new InsertElementInst(v,s,i,"v",basicBlock);
>
>
>
> return v;
>
> }
>
>
>
> Function* generateVectorAndSelect(Module* pModule)
>
> {
>
> std::vector<Type const*> params;
>
>
>
> params.push_back(Type::FloatTy);
>
>
>
> Fun...
2007 Jul 26
0
[LLVMdev] Seg faulting on vector ops
...t; AllocaInst(VectorType::get(Type::FloatTy,dim),"pv",basicBlock);
>>>
>>> Value* v = new LoadInst(pV,"v",basicBlock);
>>>
>>>
>>>
>>> for (unsigned int i = 0 ; i < dim ; ++i)
>>>
>>> v = new InsertElementInst(v,s,i,"v",basicBlock);
>>>
>>>
>>>
>>> return v;
>>>
>>> }
>>>
>>>
>>>
>>> Function* generateVectorAndSelect(Module* pModule)
>>>
>>> {
>>>
>>> std::vector&l...