search for: getelementptr

Displaying 20 results from an estimated 2665 matches for "getelementptr".

2015 Jun 22
2
[LLVMdev] bb-vectorizer transforms only part of the block
...anks, Frank ; ModuleID = '<stdin>' target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" define void @main(i64 %lo, i64 %hi, float* noalias %arg0, float* noalias %arg1, float* noalias %arg2) { entrypoint: %0 = getelementptr float* %arg1, i64 64 %1 = getelementptr float* %arg2, i64 64 %2 = getelementptr float* %arg0, i64 64 %3 = bitcast float* %arg1 to <4 x float>* %4 = bitcast float* %0 to <4 x float>* %5 = bitcast float* %arg2 to <4 x float>* %6 = bitcast float* %1 to <4 x float...
2015 Jul 01
3
[LLVMdev] SLP vectorizer on AVX feature
...success. In any case, the target architecture should be detected with the -datalayout pass, right? Any idea what I am missing? Frank -------------- next part -------------- define void @main(i64 %lo, i64 %hi, float* noalias %arg0, float* noalias %arg1, float* noalias %arg2) { entrypoint: %0 = getelementptr float* %arg1, i32 0 %1 = load float* %0 %2 = getelementptr float* %arg2, i32 0 %3 = load float* %2 %4 = fadd float %3, %1 %5 = getelementptr float* %arg0, i32 0 store float %4, float* %5 %6 = getelementptr float* %arg1, i32 1 %7 = load float* %6 %8 = getelementptr float* %arg2, i3...
2014 Aug 07
3
[LLVMdev] MCJIT generates MOVAPS on unaligned address
...struction requires the memory address to be 16 byte aligned which 88 plus something aligned to 4 byte isn't. Here the according IR code which was produced from the SLP vectorizer: define void @func(float* noalias %arg0, float* noalias %arg1, float* noalias %arg2) { entrypoint: ... %104 = getelementptr float* %arg0, i32 22 ... %204 = bitcast float* %104 to <4 x float>* store <4 x float> %198, <4 x float>* %204 This in itself not wrong. However, shouldn't the lowering pass recognize the wrong alignment? I am using LLVM 3.4.2 as available as source code from llvm.org....
2016 Apr 29
2
[MemorySSA] Potential CachingMemorySSAWalker bug
...nt.html> -------------- next part -------------- ; opt -early-cse -S < LoadShorts-simple2.ll target triple = "aarch64--linux-gnu" %S1 = type { i32, i32, i16, i16, i8, i8 } define void @test() { entry: %call1 = call noalias i8* @malloc() %0 = bitcast i8* %call1 to %S1* %ui = getelementptr inbounds %S1, %S1* %0, i32 0, i32 0 store i32 undef, i32* %ui, align 4 %us = getelementptr inbounds %S1, %S1* %0, i32 0, i32 2 store i16 undef, i16* %us, align 4 %s = getelementptr inbounds %S1, %S1* %0, i32 0, i32 3 store i16 undef, i16* %s, align 2 %ub = getelementptr inbounds %S1, %S...
2014 Aug 07
3
[LLVMdev] How to broaden the SLP vectorizer's search
On 7 August 2014 17:33, Chad Rosier <mcrosier at codeaurora.org> wrote: > You might consider filing a bug (llvm.org/bugs) requesting a flag, but I > don't know if the code owners want to expose such a flag. I'm not sure that's a good idea as a raw access to that limit, as there are no guarantees that it'll stay the same. But maybe a flag turning some
2011 May 03
3
[LLVMdev] GVN Infinite loop
Hi, GVN seems to be running in an infinite loop on my example. I have attached the output of one iteration. I cant seem to reduce the testcase either. Any pointers to how to reduce the test case. THanks, Arushi GVN iteration: 8 GVN WIDENED LOAD: %0 = load i8* getelementptr inbounds (%struct.CHESS_POSITION* @search, i64 0, i32 23), align 2, !dbg !875 TO: %1 = load i16* bitcast (i8* getelementptr inbounds (%struct.CHESS_POSITION* @search, i64 0, i32 23) to i16*), align 2 GVN COERCED INST: %0 = load i8* getelementptr inbounds (%struct.CHESS_POSITION* @search, i64 0,...
2012 Feb 16
0
[LLVMdev] Wrong AliasAnalysis::getModRefInfo result
...;(); for (Module::iterator it = M.begin(); it != M.end(); it++){ Function &F = *it; errs().write_escaped(F.getName()) << '\n'; for (inst_iterator I = inst_begin(F), E = inst_end(F); I != E; ++I) { Instruction *Inst = &*I; if ( GetElementPtrInst *gep = dyn_cast<GetElementPtrInst>(Inst) ) geps.push_back(gep); } } errs() << "List of GEPs:\n"; for(std::list<GetElementPtrInst* >::iterator itGep1 = geps.begin(); itGep1 != geps.end(); itGep1++){ GetElement...
2012 Feb 15
2
[LLVMdev] Wrong AliasAnalysis::getModRefInfo result
...nst_begin(F), E = inst_end(F); I != E; ++I) { Instruction *Inst = &*I; if ( CallInst *ci = dyn_cast<CallInst>(Inst) ){ ci->dump(); for(int i = 0; i < ci->getNumArgOperands(); i++){ Value *v = ci->getArgOperand(i); if (GetElementPtrInst *vi = dyn_cast<GetElementPtrInst>(v)){ Value *vPtr = vi->getPointerOperand(); vPtr->dump(); if ( AllocaInst *allo = dyn_cast<AllocaInst>(vPtr) ) { const Type *t = allo->getAllocatedType(); if ( const...
2012 Feb 16
0
[LLVMdev] Wrong AliasAnalysis::getModRefInfo result
Thanks Duncan! You are right! If I type the command "opt -basicaa -mypass ...", then the output makes sense. Now, how can you specify which AA to use in the code? Regards, Welson On Thu, Feb 16, 2012 at 12:05 PM, Duncan Sands <baldrick at free.fr> wrote: > Hi Welson, the default alias analysis is -no-aa. As the name suggests it > just returns MayAlias for everything.
2012 Feb 16
2
[LLVMdev] Wrong AliasAnalysis::getModRefInfo result
Hi Welson, the default alias analysis is -no-aa. As the name suggests it just returns MayAlias for everything. Maybe you are using that one? Best wishes, Duncan.
2011 May 04
0
[LLVMdev] GVN Infinite loop
...ases that cause infinite loops (it has a -timeout flag), I'd try it. Even if this doesn't help, please do file a bug with whatever you have. This is likely to be a recent regression. -Chris > > THanks, > Arushi > > GVN iteration: 8 > GVN WIDENED LOAD: %0 = load i8* getelementptr inbounds (%struct.CHESS_POSITION* @search, i64 0, i32 23), align 2, !dbg !875 > TO: %1 = load i16* bitcast (i8* getelementptr inbounds (%struct.CHESS_POSITION* @search, i64 0, i32 23) to i16*), align 2 > GVN COERCED INST: > %0 = load i8* getelementptr inbounds (%struct.CHESS_POSITION*...
2016 Oct 06
2
LoopVectorizer -- generating bad and unhandled shufflevector sequence
...ec.ptr332, %while.body320 ], [ %74, %while.body320.preheader ] %rl.0289 = phi i64* [ %incdec.ptr333, %while.body320 ], [ %75, %while.body320.preheader ] %len.0288 = phi i32 [ %dec, %while.body320 ], [ %conv316, %while.body320.preheader ] %dec = add nsw i32 %len.0288, -1 %incdec.ptr = getelementptr inbounds i64, i64* %ll.0290, i64 1 %176 = load i64, i64* %ll.0290, align 8 %incdec.ptr321 = getelementptr inbounds i64, i64* %rl.0289, i64 1 %177 = load i64, i64* %rl.0289, align 8 %and322 = and i64 %177, %176 %incdec.ptr323 = getelementptr inbounds i64, i64* %dl.0291, i64 1 store...
2014 Sep 19
3
[LLVMdev] [Vectorization] Mis match in code generated
...ectorization :*target datalayout = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128" target triple = "x86_64-pc-linux-gnu" ; Function Attrs: nounwind define void @foo(i32* nocapture readonly %a, i32* nocapture %sum) #0 { entry: %0 = load i32* %a, align 4, !tbaa !1 %arrayidx1 = getelementptr inbounds i32* %a, i32 1 %1 = load i32* %arrayidx1, align 4, !tbaa !1 %add = add nsw i32 %1, %0 %arrayidx2 = getelementptr inbounds i32* %a, i32 2 %2 = load i32* %arrayidx2, align 4, !tbaa !1 %add3 = add nsw i32 %add, %2 %arrayidx4 = getelementptr inbounds i32* %a, i32 3 %3 = load i32*...
2012 Jul 31
3
[LLVMdev] [DragonEgg] Mysterious FRAME coming from gimple to LLVM
...2 store %struct.FRAME.matmul* %CHAIN.41, %struct.FRAME.matmul** %CHAIN.41_addr %0 = load %struct.FRAME.matmul** %CHAIN.41_addr, align 64 %"ssa point" = bitcast i32 0 to i32 br label %"2" "2": ; preds = %entry %1 = getelementptr inbounds %struct.FRAME.matmul* %0, i32 0, i32 12 %2 = load i32** %1, align 8 %3 = load i32* %2, align 4 %4 = icmp sle i32 1, %3 br i1 %4, label %"3", label %"8" "3": ; preds = %"7", %"2" %5 = p...
2011 Oct 18
2
[LLVMdev] LLVM constant propagation optimization question
Hi all, I'm writting following LLVM assembly: ; ModuleID = 'structaccess.ll' %struct._anon0 = type <{ i32, i32, i32 }> @s = common global %struct._anon0 zeroinitializer define arm_aapcscc void @foo() nounwind { L.entry: store i32 5, i32* getelementptr inbounds (%struct._anon0* @s, i32 0, i32 0) store i32 10, i32* getelementptr inbounds (%struct._anon0* @s, i32 0, i32 1) %0 = load i32* getelementptr inbounds (%struct._anon0* @s, i32 0, i32 0) %1 = load i32* getelementptr inbounds (%struct._anon0* @s, i32 0, i32 1) %2 = add i32 %0, %1 st...
2013 Feb 14
1
[LLVMdev] LiveIntervals analysis problem
...ca [13 x i16], align 2 %u.i = alloca [13 x i16], align 2 %w.i = alloca [13 x i16], align 2 %e = alloca [13 x i16], align 2 %rnd = alloca %struct.LDPARMS, align 4 %outbuf = alloca [57 x i8], align 1 %du = alloca double, align 4 store double %d, double* %du, align 4, !tbaa !0 %rlast = getelementptr inbounds %struct.LDPARMS* %rnd, i32 0, i32 0 store i32 -1, i32* %rlast, align 4, !tbaa !3 %rndprc = getelementptr inbounds %struct.LDPARMS* %rnd, i32 0, i32 1 store i32 144, i32* %rndprc, align 4, !tbaa !3 %_result = getelementptr inbounds %struct._reent* %ptr, i32 0, i32 10 %0 = load %st...
2014 Sep 18
2
[LLVMdev] [Vectorization] Mis match in code generated
...ine i32 > @foo(i32* nocapture readonly %a, i32 %n) #0 {entry: br label > %for.bodyfor.body: ; preds = > %for.body, %entry %i.05 = phi i32 [ 0, %entry ], [ %inc, %for.body ] > %sum.04 = phi i32 [ 0, %entry ], [ %add, %for.body ] %arrayidx = > getelementptr inbounds i32* %a, i32 %i.05 %0 = load i32* %arrayidx, align > 4, !tbaa !1 %add = add nsw i32 %0, %sum.04 %inc = add nsw i32 %i.05, 1 > %exitcond = icmp eq i32 %i.05, 15 br i1 %exitcond, label %for.end, label > %for.bodyfor.end: ; preds = > %f...
2015 Dec 11
2
Optimization of successive constant stores
Hmm... found an interesting issue: Given: %2 = getelementptr inbounds %UodStructType* %0, i32 0, i32 0 store i8 1, i8* %2, align 8 %3 = getelementptr inbounds %UodStructType* %0, i32 0, i32 1 store i8 2, i8* %3, align 1 %4 = getelementptr inbounds %UodStructType* %0, i32 0, i32 2 store i8 3, i8* %4, align 2 %5 = getelementptr inbounds...
2014 Sep 18
2
[LLVMdev] [Vectorization] Mis match in code generated
...trs: nounwind readonlydefine i32 @foo(i32* nocapture readonly %a, i32 %n) #0 {entry: br label %for.bodyfor.body: ; preds = %for.body, %entry %i.05 = phi i32 [ 0, %entry ], [ %inc, %for.body ] %sum.04 = phi i32 [ 0, %entry ], [ %add, %for.body ] %arrayidx = getelementptr inbounds i32* %a, i32 %i.05 %0 = load i32* %arrayidx, align 4, !tbaa !1 %add = add nsw i32 %0, %sum.04 %inc = add nsw i32 %i.05, 1 %exitcond = icmp eq i32 %i.05, 15 br i1 %exitcond, label %for.end, label %for.bodyfor.end: ; preds = %for.body ret i32 %ad...
2010 May 29
3
[LLVMdev] Vectorized LLVM IR
...rated loops that can be auto-vectorized by some compilers like Intel ICC, this works quite well...) The scalar LLVM code is : define void @llvm_compute(%struct.llvm_dsp* %obj, i32 %count, float** noalias %inputs, float** noalias %outputs) nounwind readnone ssp { entry: %input_array_ptr0 = getelementptr inbounds float** %inputs, i64 0 %input0 = load float** %input_array_ptr0, align 8 %input_array_ptr1 = getelementptr inbounds float** %inputs, i64 1 %input1 = load float** %input_array_ptr1, align 8 %input_array_ptr2 = getelementptr inbounds float** %inputs, i64 2 %input2 =...