diff options
Diffstat (limited to 'test/Transforms/LoopStrengthReduce/X86')
8 files changed, 121 insertions, 113 deletions
diff --git a/test/Transforms/LoopStrengthReduce/X86/2008-08-14-ShadowIV.ll b/test/Transforms/LoopStrengthReduce/X86/2008-08-14-ShadowIV.ll index 9a7f486..ba03597 100644 --- a/test/Transforms/LoopStrengthReduce/X86/2008-08-14-ShadowIV.ll +++ b/test/Transforms/LoopStrengthReduce/X86/2008-08-14-ShadowIV.ll @@ -1,5 +1,9 @@ ; RUN: opt < %s -loop-reduce -S -mtriple=x86_64-unknown-unknown | grep "phi double" | count 1 +; Provide legal integer types. +target datalayout = "n8:16:32:64" + + define void @foobar(i32 %n) nounwind { entry: icmp eq i32 %n, 0 ; <i1>:0 [#uses=2] diff --git a/test/Transforms/LoopStrengthReduce/X86/2011-07-20-DoubleIV.ll b/test/Transforms/LoopStrengthReduce/X86/2011-07-20-DoubleIV.ll index 2fe62e3..0fc928c 100644 --- a/test/Transforms/LoopStrengthReduce/X86/2011-07-20-DoubleIV.ll +++ b/test/Transforms/LoopStrengthReduce/X86/2011-07-20-DoubleIV.ll @@ -4,6 +4,10 @@ ; nonzero initial value. ; rdar://9786536 +; Provide legal integer types. +target datalayout = "n8:16:32:64" + + ; First, make sure LSR doesn't crash on an empty IVUsers list. ; CHECK-LABEL: @dummyIV( ; CHECK-NOT: phi diff --git a/test/Transforms/LoopStrengthReduce/X86/2011-12-04-loserreg.ll b/test/Transforms/LoopStrengthReduce/X86/2011-12-04-loserreg.ll index 001a1d6..862fff2 100644 --- a/test/Transforms/LoopStrengthReduce/X86/2011-12-04-loserreg.ll +++ b/test/Transforms/LoopStrengthReduce/X86/2011-12-04-loserreg.ll @@ -29,34 +29,34 @@ for.body: ; preds = %entry, %for.body %indvars.iv39 = phi i64 [ %indvars.iv.next40, %for.body ], [ 0, %entry ] %dp.036 = phi i32* [ %add.ptr, %for.body ], [ %destrow, %entry ] %p.035 = phi float* [ %incdec.ptr4, %for.body ], [ %srcrow, %entry ] - %incdec.ptr = getelementptr inbounds float* %p.035, i64 1 - %0 = load float* %incdec.ptr, align 4 - %incdec.ptr2 = getelementptr inbounds float* %p.035, i64 2 - %1 = load float* %incdec.ptr2, align 4 - %incdec.ptr3 = getelementptr inbounds float* %p.035, i64 3 - %2 = load float* %incdec.ptr3, align 4 - %incdec.ptr4 = getelementptr inbounds float* %p.035, i64 4 - %3 = load float* %incdec.ptr4, align 4 - %4 = load i32* %dp.036, align 4 + %incdec.ptr = getelementptr inbounds float, float* %p.035, i64 1 + %0 = load float, float* %incdec.ptr, align 4 + %incdec.ptr2 = getelementptr inbounds float, float* %p.035, i64 2 + %1 = load float, float* %incdec.ptr2, align 4 + %incdec.ptr3 = getelementptr inbounds float, float* %p.035, i64 3 + %2 = load float, float* %incdec.ptr3, align 4 + %incdec.ptr4 = getelementptr inbounds float, float* %p.035, i64 4 + %3 = load float, float* %incdec.ptr4, align 4 + %4 = load i32, i32* %dp.036, align 4 %conv5 = fptoui float %0 to i32 %or = or i32 %4, %conv5 - %arrayidx6 = getelementptr inbounds i32* %dp.036, i64 1 - %5 = load i32* %arrayidx6, align 4 + %arrayidx6 = getelementptr inbounds i32, i32* %dp.036, i64 1 + %5 = load i32, i32* %arrayidx6, align 4 %conv7 = fptoui float %1 to i32 %or8 = or i32 %5, %conv7 - %arrayidx9 = getelementptr inbounds i32* %dp.036, i64 2 - %6 = load i32* %arrayidx9, align 4 + %arrayidx9 = getelementptr inbounds i32, i32* %dp.036, i64 2 + %6 = load i32, i32* %arrayidx9, align 4 %conv10 = fptoui float %2 to i32 %or11 = or i32 %6, %conv10 - %arrayidx12 = getelementptr inbounds i32* %dp.036, i64 3 - %7 = load i32* %arrayidx12, align 4 + %arrayidx12 = getelementptr inbounds i32, i32* %dp.036, i64 3 + %7 = load i32, i32* %arrayidx12, align 4 %conv13 = fptoui float %3 to i32 %or14 = or i32 %7, %conv13 store i32 %or, i32* %dp.036, align 4 store i32 %or8, i32* %arrayidx6, align 4 store i32 %or11, i32* %arrayidx9, align 4 store i32 %or14, i32* %arrayidx12, align 4 - %add.ptr = getelementptr inbounds i32* %dp.036, i64 4 + %add.ptr = getelementptr inbounds i32, i32* %dp.036, i64 4 %indvars.iv.next40 = add i64 %indvars.iv39, 4 %dummycnt = add i64 %dummyiv, 1 %cmp = icmp ult i64 %indvars.iv.next40, %count @@ -76,14 +76,14 @@ for.body23: ; preds = %for.body23, %for.bo %indvars.iv = phi i64 [ 0, %for.body23.lr.ph ], [ %indvars.iv.next, %for.body23 ] %dp.132 = phi i32* [ %add.ptr, %for.body23.lr.ph ], [ %incdec.ptr28, %for.body23 ] %p.131 = phi float* [ %incdec.ptr4, %for.body23.lr.ph ], [ %incdec.ptr24, %for.body23 ] - %incdec.ptr24 = getelementptr inbounds float* %p.131, i64 1 - %9 = load float* %incdec.ptr24, align 4 - %10 = load i32* %dp.132, align 4 + %incdec.ptr24 = getelementptr inbounds float, float* %p.131, i64 1 + %9 = load float, float* %incdec.ptr24, align 4 + %10 = load i32, i32* %dp.132, align 4 %conv25 = fptoui float %9 to i32 %or26 = or i32 %10, %conv25 store i32 %or26, i32* %dp.132, align 4 %indvars.iv.next = add i64 %indvars.iv, 1 - %incdec.ptr28 = getelementptr inbounds i32* %dp.132, i64 1 + %incdec.ptr28 = getelementptr inbounds i32, i32* %dp.132, i64 1 %exitcond = icmp eq i64 %indvars.iv.next, %8 br i1 %exitcond, label %for.end29, label %for.body23 diff --git a/test/Transforms/LoopStrengthReduce/X86/2012-01-13-phielim.ll b/test/Transforms/LoopStrengthReduce/X86/2012-01-13-phielim.ll index c3b8b89..184e300 100644 --- a/test/Transforms/LoopStrengthReduce/X86/2012-01-13-phielim.ll +++ b/test/Transforms/LoopStrengthReduce/X86/2012-01-13-phielim.ll @@ -27,14 +27,14 @@ while.body.i: ; preds = %cond.true29.i, %whi for.body.i: ; preds = %for.body.i, %while.body.i %indvars.iv.i = phi i64 [ 0, %while.body.i ], [ %indvars.iv.next.i, %for.body.i ] %add.ptr.sum = add i64 %add.ptr.sum.i, %indvars.iv.i - %arrayidx22.i = getelementptr inbounds i8* %base, i64 %add.ptr.sum - %0 = load i8* %arrayidx22.i, align 1 + %arrayidx22.i = getelementptr inbounds i8, i8* %base, i64 %add.ptr.sum + %0 = load i8, i8* %arrayidx22.i, align 1 %indvars.iv.next.i = add i64 %indvars.iv.i, 1 %cmp = call i1 @check() nounwind br i1 %cmp, label %for.end.i, label %for.body.i for.end.i: ; preds = %for.body.i - %add.ptr.i144 = getelementptr inbounds i8* %base, i64 %add.ptr.sum.i + %add.ptr.i144 = getelementptr inbounds i8, i8* %base, i64 %add.ptr.sum.i %cmp2 = tail call i1 @foo(i8* %add.ptr.i144, i8* %add.ptr.i144, i8* undef) nounwind br i1 %cmp2, label %cond.true29.i, label %cond.false35.i @@ -68,19 +68,19 @@ entry: for.cond468: ; preds = %if.then477, %entry %indvars.iv1163 = phi i64 [ %indvars.iv.next1164, %if.then477 ], [ 1, %entry ] - %k.0.in = phi i32* [ %last, %if.then477 ], [ getelementptr inbounds ([5000 x %struct.anon.7.91.199.307.415.475.559.643.751.835.943.1003.1111.1219.1351.1375.1399.1435.1471.1483.1519.1531.1651.1771]* @tags, i64 0, i64 0, i32 2), %entry ] - %k.0 = load i32* %k.0.in, align 4 + %k.0.in = phi i32* [ %last, %if.then477 ], [ getelementptr inbounds ([5000 x %struct.anon.7.91.199.307.415.475.559.643.751.835.943.1003.1111.1219.1351.1375.1399.1435.1471.1483.1519.1531.1651.1771], [5000 x %struct.anon.7.91.199.307.415.475.559.643.751.835.943.1003.1111.1219.1351.1375.1399.1435.1471.1483.1519.1531.1651.1771]* @tags, i64 0, i64 0, i32 2), %entry ] + %k.0 = load i32, i32* %k.0.in, align 4 %0 = trunc i64 %indvars.iv1163 to i32 %cmp469 = icmp slt i32 %0, %n br i1 %cmp469, label %for.body471, label %for.inc498 for.body471: ; preds = %for.cond468 - %first = getelementptr inbounds [5000 x %struct.anon.7.91.199.307.415.475.559.643.751.835.943.1003.1111.1219.1351.1375.1399.1435.1471.1483.1519.1531.1651.1771]* @tags, i64 0, i64 %indvars.iv1163, i32 1 - %1 = load i32* %first, align 4 + %first = getelementptr inbounds [5000 x %struct.anon.7.91.199.307.415.475.559.643.751.835.943.1003.1111.1219.1351.1375.1399.1435.1471.1483.1519.1531.1651.1771], [5000 x %struct.anon.7.91.199.307.415.475.559.643.751.835.943.1003.1111.1219.1351.1375.1399.1435.1471.1483.1519.1531.1651.1771]* @tags, i64 0, i64 %indvars.iv1163, i32 1 + %1 = load i32, i32* %first, align 4 br i1 undef, label %if.then477, label %for.inc498 if.then477: ; preds = %for.body471 - %last = getelementptr inbounds [5000 x %struct.anon.7.91.199.307.415.475.559.643.751.835.943.1003.1111.1219.1351.1375.1399.1435.1471.1483.1519.1531.1651.1771]* @tags, i64 0, i64 %indvars.iv1163, i32 2 + %last = getelementptr inbounds [5000 x %struct.anon.7.91.199.307.415.475.559.643.751.835.943.1003.1111.1219.1351.1375.1399.1435.1471.1483.1519.1531.1651.1771], [5000 x %struct.anon.7.91.199.307.415.475.559.643.751.835.943.1003.1111.1219.1351.1375.1399.1435.1471.1483.1519.1531.1651.1771]* @tags, i64 0, i64 %indvars.iv1163, i32 2 %indvars.iv.next1164 = add i64 %indvars.iv1163, 1 br label %for.cond468 @@ -118,14 +118,14 @@ for.body3.us.i: ; preds = %meshBB, %for.body3. %0 = add nsw i64 %indvars.iv.i.SV.phi, %indvars.iv8.i.SV.phi26 %1 = trunc i64 %0 to i32 %mul.i.us.i = mul nsw i32 0, %1 - %arrayidx5.us.i = getelementptr inbounds double* %u, i64 %indvars.iv.i.SV.phi - %2 = load double* %arrayidx5.us.i, align 8 + %arrayidx5.us.i = getelementptr inbounds double, double* %u, i64 %indvars.iv.i.SV.phi + %2 = load double, double* %arrayidx5.us.i, align 8 %indvars.iv.next.i = add i64 %indvars.iv.i.SV.phi, 1 br i1 undef, label %for.inc8.us.i, label %meshBB for.body3.lr.ph.us.i: ; preds = %meshBB1, %meshBB %indvars.iv8.i.SV.phi26 = phi i64 [ undef, %meshBB1 ], [ %indvars.iv8.i.SV.phi24, %meshBB ] - %arrayidx.us.i = getelementptr inbounds double* undef, i64 %indvars.iv8.i.SV.phi26 + %arrayidx.us.i = getelementptr inbounds double, double* undef, i64 %indvars.iv8.i.SV.phi26 %3 = add i64 %indvars.iv8.i.SV.phi26, 1 br label %for.body3.us.i diff --git a/test/Transforms/LoopStrengthReduce/X86/ivchain-X86.ll b/test/Transforms/LoopStrengthReduce/X86/ivchain-X86.ll index d8636a8..c1099b2 100644 --- a/test/Transforms/LoopStrengthReduce/X86/ivchain-X86.ll +++ b/test/Transforms/LoopStrengthReduce/X86/ivchain-X86.ll @@ -29,18 +29,18 @@ entry: loop: %iv = phi i32* [ %a, %entry ], [ %iv4, %loop ] %s = phi i32 [ 0, %entry ], [ %s4, %loop ] - %v = load i32* %iv - %iv1 = getelementptr inbounds i32* %iv, i32 %x - %v1 = load i32* %iv1 - %iv2 = getelementptr inbounds i32* %iv1, i32 %x - %v2 = load i32* %iv2 - %iv3 = getelementptr inbounds i32* %iv2, i32 %x - %v3 = load i32* %iv3 + %v = load i32, i32* %iv + %iv1 = getelementptr inbounds i32, i32* %iv, i32 %x + %v1 = load i32, i32* %iv1 + %iv2 = getelementptr inbounds i32, i32* %iv1, i32 %x + %v2 = load i32, i32* %iv2 + %iv3 = getelementptr inbounds i32, i32* %iv2, i32 %x + %v3 = load i32, i32* %iv3 %s1 = add i32 %s, %v %s2 = add i32 %s1, %v1 %s3 = add i32 %s2, %v2 %s4 = add i32 %s3, %v3 - %iv4 = getelementptr inbounds i32* %iv3, i32 %x + %iv4 = getelementptr inbounds i32, i32* %iv3, i32 %x %cmp = icmp eq i32* %iv4, %b br i1 %cmp, label %exit, label %loop exit: @@ -71,18 +71,18 @@ entry: loop: %iv = phi i32* [ %a, %entry ], [ %iv4, %loop ] %s = phi i32 [ 0, %entry ], [ %s4, %loop ] - %v = load i32* %iv - %iv1 = getelementptr inbounds i32* %iv, i32 %x - %v1 = load i32* %iv1 - %iv2 = getelementptr inbounds i32* %iv1, i32 %x - %v2 = load i32* %iv2 - %iv3 = getelementptr inbounds i32* %iv2, i32 %x - %v3 = load i32* %iv3 + %v = load i32, i32* %iv + %iv1 = getelementptr inbounds i32, i32* %iv, i32 %x + %v1 = load i32, i32* %iv1 + %iv2 = getelementptr inbounds i32, i32* %iv1, i32 %x + %v2 = load i32, i32* %iv2 + %iv3 = getelementptr inbounds i32, i32* %iv2, i32 %x + %v3 = load i32, i32* %iv3 %s1 = add i32 %s, %v %s2 = add i32 %s1, %v1 %s3 = add i32 %s2, %v2 %s4 = add i32 %s3, %v3 - %iv4 = getelementptr inbounds i32* %iv3, i32 %x + %iv4 = getelementptr inbounds i32, i32* %iv3, i32 %x store i32 %s4, i32* %iv %cmp = icmp eq i32* %iv4, %b br i1 %cmp, label %exit, label %loop @@ -126,26 +126,26 @@ for.body: ; preds = %for.body.lr.ph, %fo %i.010 = phi i32 [ 0, %for.body.lr.ph ], [ %inc, %for.body ] %res.addr.09 = phi i32* [ %res, %for.body.lr.ph ], [ %add.ptr7, %for.body ] %0 = bitcast i8* %main.addr.011 to i32* - %1 = load i32* %0, align 4 - %add.ptr = getelementptr inbounds i8* %main.addr.011, i32 %main_stride + %1 = load i32, i32* %0, align 4 + %add.ptr = getelementptr inbounds i8, i8* %main.addr.011, i32 %main_stride %2 = bitcast i8* %add.ptr to i32* - %3 = load i32* %2, align 4 - %add.ptr1 = getelementptr inbounds i8* %main.addr.011, i32 %add.ptr.sum + %3 = load i32, i32* %2, align 4 + %add.ptr1 = getelementptr inbounds i8, i8* %main.addr.011, i32 %add.ptr.sum %4 = bitcast i8* %add.ptr1 to i32* - %5 = load i32* %4, align 4 - %add.ptr2 = getelementptr inbounds i8* %main.addr.011, i32 %add.ptr1.sum + %5 = load i32, i32* %4, align 4 + %add.ptr2 = getelementptr inbounds i8, i8* %main.addr.011, i32 %add.ptr1.sum %6 = bitcast i8* %add.ptr2 to i32* - %7 = load i32* %6, align 4 - %add.ptr3 = getelementptr inbounds i8* %main.addr.011, i32 %add.ptr4.sum + %7 = load i32, i32* %6, align 4 + %add.ptr3 = getelementptr inbounds i8, i8* %main.addr.011, i32 %add.ptr4.sum %8 = bitcast i8* %add.ptr3 to i32* - %9 = load i32* %8, align 4 + %9 = load i32, i32* %8, align 4 %add = add i32 %3, %1 %add4 = add i32 %add, %5 %add5 = add i32 %add4, %7 %add6 = add i32 %add5, %9 store i32 %add6, i32* %res.addr.09, align 4 - %add.ptr6 = getelementptr inbounds i8* %main.addr.011, i32 %add.ptr3.sum - %add.ptr7 = getelementptr inbounds i32* %res.addr.09, i32 %y + %add.ptr6 = getelementptr inbounds i8, i8* %main.addr.011, i32 %add.ptr3.sum + %add.ptr7 = getelementptr inbounds i32, i32* %res.addr.09, i32 %y %inc = add i32 %i.010, 1 %cmp = icmp eq i32 %inc, %z br i1 %cmp, label %for.end, label %for.body @@ -172,48 +172,48 @@ entry: for.body: ; preds = %for.body, %entry %i.07 = phi i32 [ 0, %entry ], [ %inc.3, %for.body ] - %arrayidx = getelementptr inbounds i8* %a, i32 %i.07 - %0 = load i8* %arrayidx, align 1 + %arrayidx = getelementptr inbounds i8, i8* %a, i32 %i.07 + %0 = load i8, i8* %arrayidx, align 1 %conv5 = zext i8 %0 to i32 - %arrayidx1 = getelementptr inbounds i8* %b, i32 %i.07 - %1 = load i8* %arrayidx1, align 1 + %arrayidx1 = getelementptr inbounds i8, i8* %b, i32 %i.07 + %1 = load i8, i8* %arrayidx1, align 1 %conv26 = zext i8 %1 to i32 %add = add nsw i32 %conv26, %conv5 %conv3 = trunc i32 %add to i8 - %arrayidx4 = getelementptr inbounds i8* %c, i32 %i.07 + %arrayidx4 = getelementptr inbounds i8, i8* %c, i32 %i.07 store i8 %conv3, i8* %arrayidx4, align 1 %inc1 = or i32 %i.07, 1 - %arrayidx.1 = getelementptr inbounds i8* %a, i32 %inc1 - %2 = load i8* %arrayidx.1, align 1 + %arrayidx.1 = getelementptr inbounds i8, i8* %a, i32 %inc1 + %2 = load i8, i8* %arrayidx.1, align 1 %conv5.1 = zext i8 %2 to i32 - %arrayidx1.1 = getelementptr inbounds i8* %b, i32 %inc1 - %3 = load i8* %arrayidx1.1, align 1 + %arrayidx1.1 = getelementptr inbounds i8, i8* %b, i32 %inc1 + %3 = load i8, i8* %arrayidx1.1, align 1 %conv26.1 = zext i8 %3 to i32 %add.1 = add nsw i32 %conv26.1, %conv5.1 %conv3.1 = trunc i32 %add.1 to i8 - %arrayidx4.1 = getelementptr inbounds i8* %c, i32 %inc1 + %arrayidx4.1 = getelementptr inbounds i8, i8* %c, i32 %inc1 store i8 %conv3.1, i8* %arrayidx4.1, align 1 %inc.12 = or i32 %i.07, 2 - %arrayidx.2 = getelementptr inbounds i8* %a, i32 %inc.12 - %4 = load i8* %arrayidx.2, align 1 + %arrayidx.2 = getelementptr inbounds i8, i8* %a, i32 %inc.12 + %4 = load i8, i8* %arrayidx.2, align 1 %conv5.2 = zext i8 %4 to i32 - %arrayidx1.2 = getelementptr inbounds i8* %b, i32 %inc.12 - %5 = load i8* %arrayidx1.2, align 1 + %arrayidx1.2 = getelementptr inbounds i8, i8* %b, i32 %inc.12 + %5 = load i8, i8* %arrayidx1.2, align 1 %conv26.2 = zext i8 %5 to i32 %add.2 = add nsw i32 %conv26.2, %conv5.2 %conv3.2 = trunc i32 %add.2 to i8 - %arrayidx4.2 = getelementptr inbounds i8* %c, i32 %inc.12 + %arrayidx4.2 = getelementptr inbounds i8, i8* %c, i32 %inc.12 store i8 %conv3.2, i8* %arrayidx4.2, align 1 %inc.23 = or i32 %i.07, 3 - %arrayidx.3 = getelementptr inbounds i8* %a, i32 %inc.23 - %6 = load i8* %arrayidx.3, align 1 + %arrayidx.3 = getelementptr inbounds i8, i8* %a, i32 %inc.23 + %6 = load i8, i8* %arrayidx.3, align 1 %conv5.3 = zext i8 %6 to i32 - %arrayidx1.3 = getelementptr inbounds i8* %b, i32 %inc.23 - %7 = load i8* %arrayidx1.3, align 1 + %arrayidx1.3 = getelementptr inbounds i8, i8* %b, i32 %inc.23 + %7 = load i8, i8* %arrayidx1.3, align 1 %conv26.3 = zext i8 %7 to i32 %add.3 = add nsw i32 %conv26.3, %conv5.3 %conv3.3 = trunc i32 %add.3 to i8 - %arrayidx4.3 = getelementptr inbounds i8* %c, i32 %inc.23 + %arrayidx4.3 = getelementptr inbounds i8, i8* %c, i32 %inc.23 store i8 %conv3.3, i8* %arrayidx4.3, align 1 %inc.3 = add nsw i32 %i.07, 4 %exitcond.3 = icmp eq i32 %inc.3, 400 @@ -254,15 +254,15 @@ for.body: %i = phi i32 [ %inc4, %for.body ], [ 0, %entry ] store i32 %i, i32* %p, align 4 %inc1 = or i32 %i, 1 - %add.ptr.i1 = getelementptr inbounds i32* %p, i32 1 + %add.ptr.i1 = getelementptr inbounds i32, i32* %p, i32 1 store i32 %inc1, i32* %add.ptr.i1, align 4 %inc2 = add nsw i32 %i, 2 - %add.ptr.i2 = getelementptr inbounds i32* %p, i32 2 + %add.ptr.i2 = getelementptr inbounds i32, i32* %p, i32 2 store i32 %inc2, i32* %add.ptr.i2, align 4 %inc3 = add nsw i32 %i, 3 - %add.ptr.i3 = getelementptr inbounds i32* %p, i32 3 + %add.ptr.i3 = getelementptr inbounds i32, i32* %p, i32 3 store i32 %inc3, i32* %add.ptr.i3, align 4 - %p.next = getelementptr inbounds i32* %p, i32 4 + %p.next = getelementptr inbounds i32, i32* %p, i32 4 %inc4 = add nsw i32 %i, 4 %cmp = icmp slt i32 %inc4, %n br i1 %cmp, label %for.body, label %exit @@ -281,20 +281,20 @@ exit: ; X32: jne define void @testCmpZero(i8* %src, i8* %dst, i32 %srcidx, i32 %dstidx, i32 %len) nounwind ssp { entry: - %dest0 = getelementptr inbounds i8* %src, i32 %srcidx - %source0 = getelementptr inbounds i8* %dst, i32 %dstidx + %dest0 = getelementptr inbounds i8, i8* %src, i32 %srcidx + %source0 = getelementptr inbounds i8, i8* %dst, i32 %dstidx %add.ptr79.us.sum = add i32 %srcidx, %len - %lftr.limit = getelementptr i8* %src, i32 %add.ptr79.us.sum + %lftr.limit = getelementptr i8, i8* %src, i32 %add.ptr79.us.sum br label %for.body82.us for.body82.us: %dest = phi i8* [ %dest0, %entry ], [ %incdec.ptr91.us, %for.body82.us ] %source = phi i8* [ %source0, %entry ], [ %add.ptr83.us, %for.body82.us ] %0 = bitcast i8* %source to i32* - %1 = load i32* %0, align 4 + %1 = load i32, i32* %0, align 4 %trunc = trunc i32 %1 to i8 - %add.ptr83.us = getelementptr inbounds i8* %source, i32 4 - %incdec.ptr91.us = getelementptr inbounds i8* %dest, i32 1 + %add.ptr83.us = getelementptr inbounds i8, i8* %source, i32 4 + %incdec.ptr91.us = getelementptr inbounds i8, i8* %dest, i32 1 store i8 %trunc, i8* %dest, align 1 %exitcond = icmp eq i8* %incdec.ptr91.us, %lftr.limit br i1 %exitcond, label %return, label %for.body82.us diff --git a/test/Transforms/LoopStrengthReduce/X86/ivchain-stress-X86.ll b/test/Transforms/LoopStrengthReduce/X86/ivchain-stress-X86.ll index d8e0aa9..7925bf0 100644 --- a/test/Transforms/LoopStrengthReduce/X86/ivchain-stress-X86.ll +++ b/test/Transforms/LoopStrengthReduce/X86/ivchain-stress-X86.ll @@ -32,15 +32,15 @@ entry: for.body: ; preds = %entry, %for.body.3 %i.09 = phi i32 [ %add5.3, %for.body.3 ], [ 0, %entry ] - %arrayidx = getelementptr inbounds i8* %a, i32 %i.09 - %0 = load i8* %arrayidx, align 1 + %arrayidx = getelementptr inbounds i8, i8* %a, i32 %i.09 + %0 = load i8, i8* %arrayidx, align 1 %conv6 = zext i8 %0 to i32 - %arrayidx1 = getelementptr inbounds i8* %b, i32 %i.09 - %1 = load i8* %arrayidx1, align 1 + %arrayidx1 = getelementptr inbounds i8, i8* %b, i32 %i.09 + %1 = load i8, i8* %arrayidx1, align 1 %conv27 = zext i8 %1 to i32 %add = add nsw i32 %conv27, %conv6 %conv3 = trunc i32 %add to i8 - %arrayidx4 = getelementptr inbounds i8* %c, i32 %i.09 + %arrayidx4 = getelementptr inbounds i8, i8* %c, i32 %i.09 store i8 %conv3, i8* %arrayidx4, align 1 %add5 = add i32 %i.09, %s %cmp = icmp ult i32 %add5, %len @@ -50,45 +50,45 @@ for.end: ; preds = %for.body, %for.body ret void for.body.1: ; preds = %for.body - %arrayidx.1 = getelementptr inbounds i8* %a, i32 %add5 - %2 = load i8* %arrayidx.1, align 1 + %arrayidx.1 = getelementptr inbounds i8, i8* %a, i32 %add5 + %2 = load i8, i8* %arrayidx.1, align 1 %conv6.1 = zext i8 %2 to i32 - %arrayidx1.1 = getelementptr inbounds i8* %b, i32 %add5 - %3 = load i8* %arrayidx1.1, align 1 + %arrayidx1.1 = getelementptr inbounds i8, i8* %b, i32 %add5 + %3 = load i8, i8* %arrayidx1.1, align 1 %conv27.1 = zext i8 %3 to i32 %add.1 = add nsw i32 %conv27.1, %conv6.1 %conv3.1 = trunc i32 %add.1 to i8 - %arrayidx4.1 = getelementptr inbounds i8* %c, i32 %add5 + %arrayidx4.1 = getelementptr inbounds i8, i8* %c, i32 %add5 store i8 %conv3.1, i8* %arrayidx4.1, align 1 %add5.1 = add i32 %add5, %s %cmp.1 = icmp ult i32 %add5.1, %len br i1 %cmp.1, label %for.body.2, label %for.end for.body.2: ; preds = %for.body.1 - %arrayidx.2 = getelementptr inbounds i8* %a, i32 %add5.1 - %4 = load i8* %arrayidx.2, align 1 + %arrayidx.2 = getelementptr inbounds i8, i8* %a, i32 %add5.1 + %4 = load i8, i8* %arrayidx.2, align 1 %conv6.2 = zext i8 %4 to i32 - %arrayidx1.2 = getelementptr inbounds i8* %b, i32 %add5.1 - %5 = load i8* %arrayidx1.2, align 1 + %arrayidx1.2 = getelementptr inbounds i8, i8* %b, i32 %add5.1 + %5 = load i8, i8* %arrayidx1.2, align 1 %conv27.2 = zext i8 %5 to i32 %add.2 = add nsw i32 %conv27.2, %conv6.2 %conv3.2 = trunc i32 %add.2 to i8 - %arrayidx4.2 = getelementptr inbounds i8* %c, i32 %add5.1 + %arrayidx4.2 = getelementptr inbounds i8, i8* %c, i32 %add5.1 store i8 %conv3.2, i8* %arrayidx4.2, align 1 %add5.2 = add i32 %add5.1, %s %cmp.2 = icmp ult i32 %add5.2, %len br i1 %cmp.2, label %for.body.3, label %for.end for.body.3: ; preds = %for.body.2 - %arrayidx.3 = getelementptr inbounds i8* %a, i32 %add5.2 - %6 = load i8* %arrayidx.3, align 1 + %arrayidx.3 = getelementptr inbounds i8, i8* %a, i32 %add5.2 + %6 = load i8, i8* %arrayidx.3, align 1 %conv6.3 = zext i8 %6 to i32 - %arrayidx1.3 = getelementptr inbounds i8* %b, i32 %add5.2 - %7 = load i8* %arrayidx1.3, align 1 + %arrayidx1.3 = getelementptr inbounds i8, i8* %b, i32 %add5.2 + %7 = load i8, i8* %arrayidx1.3, align 1 %conv27.3 = zext i8 %7 to i32 %add.3 = add nsw i32 %conv27.3, %conv6.3 %conv3.3 = trunc i32 %add.3 to i8 - %arrayidx4.3 = getelementptr inbounds i8* %c, i32 %add5.2 + %arrayidx4.3 = getelementptr inbounds i8, i8* %c, i32 %add5.2 store i8 %conv3.3, i8* %arrayidx4.3, align 1 %add5.3 = add i32 %add5.2, %s %cmp.3 = icmp ult i32 %add5.3, %len diff --git a/test/Transforms/LoopStrengthReduce/X86/no_superflous_induction_vars.ll b/test/Transforms/LoopStrengthReduce/X86/no_superflous_induction_vars.ll index 5506994..a6613c5 100644 --- a/test/Transforms/LoopStrengthReduce/X86/no_superflous_induction_vars.ll +++ b/test/Transforms/LoopStrengthReduce/X86/no_superflous_induction_vars.ll @@ -38,9 +38,9 @@ for.body14.lr.ph: vector.body: %index = phi i64 [ %index.next, %vector.body ], [ %0, %for.body14.lr.ph ] - %4 = getelementptr inbounds i8* %rowsptr, i64 %index + %4 = getelementptr inbounds i8, i8* %rowsptr, i64 %index %5 = bitcast i8* %4 to <4 x i8>* - %wide.load = load <4 x i8>* %5, align 1 + %wide.load = load <4 x i8>, <4 x i8>* %5, align 1 %index.next = add i64 %index, 8 %6 = icmp eq i64 %index.next, %end.idx.rnd.down br i1 %6, label %for.end24, label %vector.body diff --git a/test/Transforms/LoopStrengthReduce/X86/pr17473.ll b/test/Transforms/LoopStrengthReduce/X86/pr17473.ll index e7ebaa8..093cf65 100644 --- a/test/Transforms/LoopStrengthReduce/X86/pr17473.ll +++ b/test/Transforms/LoopStrengthReduce/X86/pr17473.ll @@ -25,9 +25,9 @@ target triple = "x86_64-apple-macosx10.9.0" define i32 @main() #0 { entry: store i8 0, i8* @h, align 1 - %0 = load i32* @j, align 4 + %0 = load i32, i32* @j, align 4 %tobool.i = icmp eq i32 %0, 0 - %1 = load i32* @d, align 4 + %1 = load i32, i32* @d, align 4 %cmp3 = icmp sgt i32 %1, -1 %.lobit = lshr i32 %1, 31 %.lobit.not = xor i32 %.lobit, 1 @@ -55,7 +55,7 @@ for.end: ; preds = %fn3.exit %conv7 = sext i8 %inc to i32 %add = add nsw i32 %conv7, %conv store i32 %add, i32* @e, align 4 - %call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8]* @.str, i64 0, i64 0), i32 %add) #2 + %call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %add) #2 ret i32 0 } |