[llvm-commits] [llvm] r168711 - in /llvm/trunk: lib/Analysis/ScalarEvolution.cpp test/Transforms/IndVarSimplify/eliminate-comparison.ll
Chris Lattner
clattner at apple.com
Thu Nov 29 17:48:25 PST 2012
On Nov 29, 2012, at 11:04 AM, Benjamin Kramer <benny.kra at gmail.com> wrote:
>>
>> Hi Ben,
>>
>> Thanks for the fix. But why didn't you go for the more obvious fix?
>>
>> - return CmpInst::isFalseWhenEqual(Pred);
>> + return CmpInst::isFalseWhenEqual(FoundPred);
>>
>> As an example, invert the predicate in your test case:
>>
>> %tmp76 = icmp ne i32 %sext34, %sext21
>>
>> In this case, I think the following compare should be eliminated, but won't be with your fix:
>>
>> %tmp46 = icmp slt i32 %__key8.0, 10
>>
>> -Andy
>
> Hah, sometimes you're too blind to see the obvious. I'll fix this, thanks for the review.
>
> The original patch is still safe for 3.2, it only misses a potential optimization.
I'd prefer to have Andy approve whichever patch makes the most sense for 3.2. Andy, what do you think?
-Chris
More information about the llvm-commits
mailing list