Displaying 20 results from an estimated 298 matches for "arrayidx".
2014 Oct 17
2
[LLVMdev] opt -O2 leads to incorrect operation (possibly a bug in the DSE)
Hi all,
Consider the following example:
define void @fn(i8* %buf) #0 {
entry:
%arrayidx = getelementptr i8* %buf, i64 18
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %arrayidx, i8* %buf, i64
18, i32 1, i1 false)
%arrayidx1 = getelementptr i8* %buf, i64 18
store i8 1, i8* %arrayidx1, align 1
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %buf, i8* %arrayidx, i64
18, i32 1, i1 f...
2011 Dec 14
0
[LLVMdev] Help with hazards
...; preds = %for.end, %entry
%nl.014 = phi i32 [ 0, %entry ], [ %inc8, %for.end ]
br label %for.body4
for.body4: ; preds = %for.body4, %for.cond2.preheader
%i.013 = phi i32 [ 0, %for.cond2.preheader ], [ %inc.15, %for.body4 ]
%arrayidx = getelementptr inbounds [16000 x double]* @Y, i32 0, i32 %i.013
%0 = load double* %arrayidx, align 16, !tbaa !0
%add = fadd double %0, 1.000000e+00
%arrayidx5 = getelementptr inbounds [16000 x double]* @X, i32 0, i32 %i.013
store double %add, double* %arrayidx5, align 16, !tbaa !0
%inc15...
2019 Nov 10
2
Reassociation is blocking a vectorization
Hi Devs,
I am looking at the bug
https://bugs.llvm.org/show_bug.cgi?id=43953
and found that following piece of ir
%arrayidx = getelementptr inbounds float, float* %Vec0, i64 %idxprom
%0 = load float, float* %arrayidx, align 4, !tbaa !2
%arrayidx2 = getelementptr inbounds float, float* %Vec1, i64 %idxprom
%1 = load float, float* %arrayidx2, align 4, !tbaa !2
%sub = fsub fast float %0, %1
%add = fadd fast float...
2016 Aug 17
2
Loop vectorization with the loop containing bitcast
...vectorized.
Any comments?
Thanks,
Jin
#define N 1000
double a[N], b[N],c[N];
void foo() {
for (int i=0;i<N;i++) {
b[i] =c[i];
c[i]=0.0;
}
}
for.body: ; preds = %for.body, %entry
%indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
%arrayidx = getelementptr inbounds [1000 x double], [1000 x double]* @c, i64 0, i64 %indvars.iv
%0 = bitcast double* %arrayidx to i64*
%1 = load i64, i64* %0, align 8, !tbaa !1
%arrayidx2 = getelementptr inbounds [1000 x double], [1000 x double]* @b, i64 0, i64 %indvars.iv
%2 = bitcast double* %array...
2013 Jan 29
2
[LLVMdev] Apparent indeterminism in PreVerifier
...derstand/assume about it, a verifier pass is
not supposed to change the code (or is it?) but in debug stream I see the
following:
Common predecessor:
*** IR Dump After Loop-Closed SSA Form Pass ***
for.body.us68: ; preds =
%for.body.lr.ph.us81, %for.body.us68
%arrayidx.us70.phi = phi i8* [ %buf.0.ph, %for.body.lr.ph.us81 ], [
%arrayidx.us70.inc, %for.body.us68 ]
%add.ptr4.us72.phi = phi i8* [ %add.ptr4.us72.gep, %for.body.lr.ph.us81 ],
[ %add.ptr4.us72.inc, %for.body.us68 ]
%i.043.us69 = phi i32 [ 0, %for.body.lr.ph.us81 ], [ %inc.us73,
%for.body.us68 ]
......
2013 Jul 11
1
[LLVMdev] Scalar Evolution and Loop Trip Count.
...aken
count which is obviously wrong.
$> cat loop.ll
; Function Attrs: nounwind
define void @add(i32* noalias nocapture %a, i32* noalias nocapture %b,
i32* noalias nocapture %c) #0 {
entry:
br label %for.body
for.body: ; preds = %entry,
%for.body
%arrayidx.phi = phi i32* [ %b, %entry ], [ %arrayidx.inc, %for.body ]
%arrayidx3.phi = phi i32* [ %c, %entry ], [ %arrayidx3.inc, %for.body ]
%arrayidx5.phi = phi i32* [ %a, %entry ], [ %arrayidx5.inc, %for.body ]
%indvars.iv = phi i32 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
%0 = load i32*...
2013 Jan 29
2
[LLVMdev] Apparent indeterminism in PreVerifier
...is it?) but in debug stream
>> I see the
>> following:
>>
>> Common predecessor:
>>
>> *** IR Dump After Loop-Closed SSA Form Pass ***
>> for.body.us68: ; preds =
>> %for.body.lr.ph.us81, %for.body.us68
>> %arrayidx.us70.phi = phi i8* [ %buf.0.ph, %for.body.lr.ph.us81 ], [
>> %arrayidx.us70.inc, %for.body.us68 ]
>> %add.ptr4.us72.phi = phi i8* [ %add.ptr4.us72.gep,
>> %for.body.lr.ph.us81 ], [ %add.ptr4.us72.inc, %for.body.us68 ]
>> %i.043.us69 = phi i32 [ 0, %for.body.lr.ph.us81 ], [...
2013 Jan 29
0
[LLVMdev] Apparent indeterminism in PreVerifier
...not supposed to change the code (or is it?) but in debug stream
> I see the
> following:
>
> Common predecessor:
>
> *** IR Dump After Loop-Closed SSA Form Pass ***
> for.body.us68: ; preds =
> %for.body.lr.ph.us81, %for.body.us68
> %arrayidx.us70.phi = phi i8* [ %buf.0.ph, %for.body.lr.ph.us81 ], [
> %arrayidx.us70.inc, %for.body.us68 ]
> %add.ptr4.us72.phi = phi i8* [ %add.ptr4.us72.gep,
> %for.body.lr.ph.us81 ], [ %add.ptr4.us72.inc, %for.body.us68 ]
> %i.043.us69 = phi i32 [ 0, %for.body.lr.ph.us81 ], [ %inc.us73,
&g...
2013 Jan 29
0
[LLVMdev] Apparent indeterminism in PreVerifier
...I see the
> >> following:
> >>
> >> Common predecessor:
> >>
> >> *** IR Dump After Loop-Closed SSA Form Pass ***
> >> for.body.us68: ; preds =
> >> %for.body.lr.ph.us81, %for.body.us68
> >> %arrayidx.us70.phi = phi i8* [ %buf.0.ph, %for.body.lr.ph.us81 ], [
> >> %arrayidx.us70.inc, %for.body.us68 ] %add.ptr4.us72.phi = phi i8* [
> >> %add.ptr4.us72.gep,
> >> %for.body.lr.ph.us81 ], [ %add.ptr4.us72.inc, %for.body.us68 ]
> >> %i.043.us69 = phi i32 [ 0, %for....
2013 Jan 29
1
[LLVMdev] Apparent indeterminism in PreVerifier
...; following:
>>>>
>>>> Common predecessor:
>>>>
>>>> *** IR Dump After Loop-Closed SSA Form Pass ***
>>>> for.body.us68: ; preds =
>>>> %for.body.lr.ph.us81, %for.body.us68
>>>> %arrayidx.us70.phi = phi i8* [ %buf.0.ph, %for.body.lr.ph.us81 ], [
>>>> %arrayidx.us70.inc, %for.body.us68 ] %add.ptr4.us72.phi = phi i8* [
>>>> %add.ptr4.us72.gep,
>>>> %for.body.lr.ph.us81 ], [ %add.ptr4.us72.inc, %for.body.us68 ]
>>>> %i.043.us69 = phi i32...
2011 Jul 17
0
[LLVMdev] Trying to optimize out store/load pair
...6 = trunc i64 %indvar10 to i32
br label %for.body25
for.body25: ; preds = %for.body25, %for.cond21.preheader
%indvar4 = phi i64 [ 0, %for.cond21.preheader ], [ %indvar.next5, %for.body25 ]
%tmp19 = shl i64 %indvar4, 2
%tmp21 = add i64 %tmp20, %tmp19
%arrayidx = getelementptr i8* %inputBuffer, i64 %tmp21
%tmp23 = add i64 %tmp2227, %tmp19
%arrayidx42 = getelementptr i8* %inputBuffer, i64 %tmp23
%tmp25 = add i64 %tmp2428, %tmp19
%arrayidx49 = getelementptr i8* %inputBuffer, i64 %tmp25
%tmp7 = shl i64 %indvar4, 1
%tmp = trunc i64 %tmp7 to i32...
2011 Jul 17
0
[LLVMdev] Trying to optimize out store/load pair
...%tmp26 = trunc i64 %indvar10 to i32
br label %for.body25
for.body25: ; preds = %for.body25, %for.cond21.preheader
%indvar4 = phi i64 [ 0, %for.cond21.preheader ], [ %indvar.next5, %for.body25 ]
%tmp19 = shl i64 %indvar4, 2
%tmp21 = add i64 %tmp20, %tmp19
%arrayidx = getelementptr i8* %inputBuffer, i64 %tmp21
%tmp23 = add i64 %tmp2227, %tmp19
%arrayidx42 = getelementptr i8* %inputBuffer, i64 %tmp23
%tmp25 = add i64 %tmp2428, %tmp19
%arrayidx49 = getelementptr i8* %inputBuffer, i64 %tmp25
%tmp7 = shl i64 %indvar4, 1
%tmp = trunc i64 %tmp7 to i32
%tmp37...
2013 Jan 07
0
[LLVMdev] instruction scheduling issue
Liu,
This is likely a better solution for you - you do not want to mess with
the scheduler unless you really have to ;)
Sergei
---
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by
The Linux Foundation
> -----Original Message-----
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
> On Behalf Of Krzysztof Parzyszek
> Sent:
2015 Aug 22
3
loop unrolling introduces conditional branch
...n 4
%cmp = icmp slt i32 %0, %1
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%2 = load i32, i32* %i, align 4
%3 = load i32, i32* %i, align 4
%idxprom = sext i32 %3 to i64
%4 = load i32*, i32** %array_x.addr, align 8
%arrayidx = getelementptr inbounds i32, i32* %4, i64 %idxprom
store i32 %2, i32* %arrayidx, align 4
br label %for.inc
for.inc: ; preds = %for.body
%5 = load i32, i32* %i, align 4
%inc = add i32 %5, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
fo...
2015 Dec 09
2
persuading licm to do the right thing
...try
%0 = load double** @v, align 8, !tbaa !1
br label %for.body
for.body: ; preds = %for.body, %
for.body.lr.ph
%i.06 = phi i64 [ 0, %for.body.lr.ph ], [ %inc, %for.body ]
%sum.05 = phi double [ 0.000000e+00, %for.body.lr.ph ], [ %add, %for.body
]
%arrayidx = getelementptr inbounds double* %0, i64 %i.06
%1 = load double* %arrayidx, align 8, !tbaa !5
%add = fadd double %sum.05, %1
%inc = add nsw i64 %i.06, 1
%exitcond = icmp eq i64 %inc, %n
br i1 %exitcond, label %for.end, label %for.body
for.end: ; pr...
2014 Sep 24
2
[LLVMdev] noalias and alias.scope metadata producers
...alias metadata to complement the information that alias
analysis passes compute. However, it seems that the alias information of
the pointers used in memory instructions is assumed to be different form
the information of these instructions themselves. Let me give you an
example:
MayAlias: double* %arrayidx.i, double* %arrayidx6
MayAlias: %4 = load double* %arrayidx.i, align 8, !tbaa !1, !alias.scope
!7, !noalias !10 <-> store double %2, double* %arrayidx6, align 8, !tbaa
!1
becomes:
MayAlias: double* %arrayidx.i, double* %arrayidx6
NoAlias: %4 = load double* %arrayidx.i, align 8, !tbaa...
2015 Dec 09
2
persuading licm to do the right thing
...tbaa !1
> br label %for.body
>
> for.body: ; preds = %for.body, %
> for.body.lr.ph
> %i.06 = phi i64 [ 0, %for.body.lr.ph ], [ %inc, %for.body ]
> %sum.05 = phi double [ 0.000000e+00, %for.body.lr.ph ], [ %add,
> %for.body ]
> %arrayidx = getelementptr inbounds double* %0, i64 %i.06
> %1 = load double* %arrayidx, align 8, !tbaa !5
> %add = fadd double %sum.05, %1
> %inc = add nsw i64 %i.06, 1
>
> %exitcond = icmp eq i64 %inc, %n
> br i1 %exitcond, label %for.end, label %for.body
>
> for.end:...
2015 Aug 22
2
loop unrolling introduces conditional branch
...br i1 %cmp, label %for.body, label %for.end
>
> for.body: ; preds = %for.cond
> %2 = load i32, i32* %i, align 4
> %3 = load i32, i32* %i, align 4
> %idxprom = sext i32 %3 to i64
> %4 = load i32*, i32** %array_x.addr, align 8
> %arrayidx = getelementptr inbounds i32, i32* %4, i64 %idxprom
> store i32 %2, i32* %arrayidx, align 4
> br label %for.inc
>
> for.inc: ; preds = %for.body
> %5 = load i32, i32* %i, align 4
> %inc = add i32 %5, 1
> store i32 %inc, i32* %i...
2013 Jun 25
2
[LLVMdev] SimplifyIndVar looses nsw flags
...// *** IR Dump Before Induction Variable Simplification ***
// for.body: ; preds = %entry,
%for.body
// %i.05 = phi i32 [ 0, %entry ], [ %inc, %for.body ]
// %sum.04 = phi i32 [ 0, %entry ], [ %add, %for.body ]
// %idxprom = sext i32 %i.05 to i64
// %arrayidx = getelementptr inbounds i32* %a, i64 %idxprom
// %0 = load i32* %arrayidx, align 4, !tbaa !0
// %add = add nsw i32 %0, %sum.04
// %inc = add nsw i32 %i.05, 1
// %cmp = icmp slt i32 %inc, 1000
// br i1 %cmp, label %for.body, label %for.end
// *** IR Dump After Induction Variable Simplific...
2016 Feb 11
3
Expected constant simplification not happening
...; Function Attrs: nounwind
declare void @llvm.lifetime.end(i64, i8* nocapture) #1
; Function Attrs: noinline nounwind ssp uwtable
define i8* @foo(%struct._foo* %obj, i32 %unused, i8* %value) #2 {
entry:
%tobool.i = icmp eq %struct._foo* %obj, null
%0 = bitcast %struct._foo* %obj to i8*
%arrayidx.i.i = getelementptr inbounds i8, i8* %0, i64 -16
%entries2.i = bitcast i8* %arrayidx.i.i to %struct._entry**
%f7.i = getelementptr inbounds i8, i8* %0, i64 -8
br i1 %tobool.i, label %for.end, label %call.exit.preheader
call.exit.preheader: ; preds = %entry...