[llvm-commits] [llvm] r128627 - in /llvm/trunk: lib/Transforms/InstCombine/InstCombineCompares.cpp test/Transforms/InstCombine/fcmp.ll

Benjamin Kramer benny.kra at googlemail.com
Thu Mar 31 03:52:46 PDT 2011


On 31.03.2011, at 12:42, Frits van Bommel wrote:

> On Thu, Mar 31, 2011 at 12:12 PM, Benjamin Kramer
> <benny.kra at googlemail.com> wrote:
>> +  // fcmp (fneg x), (fneg y) -> fcmp x, y
>> +  Value *X, *Y;
>> +  if (match(Op0, m_FNeg(m_Value(X))) && match(Op1, m_FNeg(m_Value(Y))))
>> +    return new FCmpInst(I.getPredicate(), X, Y);
> 
> Shouldn't this use I.getSwappedPredicate() instead? (-1 > -2, but 1 < 2)

Oops, fixed in r128628.

Thanks for the review :)



More information about the llvm-commits mailing list