[llvm-commits] [llvm] r131576 - in /llvm/trunk: lib/Transforms/Scalar/LoopStrengthReduce.cpp test/Transforms/LoopStrengthReduce/post-inc-icmpzero.ll

Rafael Avila de Espindola rafael.espindola at gmail.com
Wed May 18 16:30:29 PDT 2011


On 11-05-18 05:02 PM, Dan Gohman wrote:
> Author: djg
> Date: Wed May 18 16:02:18 2011
> New Revision: 131576
>
> URL: http://llvm.org/viewvc/llvm-project?rev=131576&view=rev
> Log:
> When forming an ICmpZero LSRUse, normalize the non-IV operand
> of the comparison, so that the resulting expression is fully
> normalized. This fixes PR9939.

Thanks!

> +; CHECK:   %tmp2 = sub i64 %sub.ptr.lhs.cast, %sub.ptr.rhs.cast
> +; CHECK:   %tmp3 = lshr i64 %tmp2, 1
> +; CHECK:   %tmp4 = mul i64 %tmp3, 2
> +; CHECK:   br label %for.body
> +; CHECK: for.body:
> +; CHECK:   %lsr.iv5 = phi i64 [ %lsr.iv.next, %for.body ], [ %tmp4, %for.body.lr.ph ]
> +; CHECK:   %lsr.iv.next = add i64 %lsr.iv5, -2
> +; CHECK:   %lsr.iv.next6 = inttoptr i64 %lsr.iv.next to i16*
> +; CHECK:   %cmp27 = icmp eq i16* %lsr.iv.next6, null
>

Don't you want a CHECK-NEXT here to check that the old

%tmp8 = add i64 %tmp7, -2

is not being created?

Cheers,
Rafael



More information about the llvm-commits mailing list