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

Dan Gohman gohman at apple.com
Thu May 19 10:35:21 PDT 2011


On May 18, 2011, at 4:30 PM, Rafael Avila de Espindola wrote:

> On 11-05-18 05:02 PM, Dan Gohman wrote:
> 
>> +; 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?

If it somehow were created, something would have to reference it
for it to matter, and that would break the pattern.

Dan




More information about the llvm-commits mailing list