[llvm-commits] [llvm-gcc-4.2] r53491 - /llvm-gcc-4.2/branches/Apple/Gaz/gcc/llvm-convert.cpp

Bill Wendling isanbard at gmail.com
Fri Jul 11 15:55:01 PDT 2008


Author: void
Date: Fri Jul 11 17:55:01 2008
New Revision: 53491

URL: http://llvm.org/viewvc/llvm-project?rev=53491&view=rev
Log:
Pull 53436 into Gaz:

For MIN and MAX the type of the comparison comes
from the type of the result, not the type of the
operands.


Modified:
    llvm-gcc-4.2/branches/Apple/Gaz/gcc/llvm-convert.cpp

Modified: llvm-gcc-4.2/branches/Apple/Gaz/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Gaz/gcc/llvm-convert.cpp?rev=53491&r1=53490&r2=53491&view=diff

==============================================================================
--- llvm-gcc-4.2/branches/Apple/Gaz/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/branches/Apple/Gaz/gcc/llvm-convert.cpp Fri Jul 11 17:55:01 2008
@@ -3383,7 +3383,7 @@
   Value *Compare;
   if (LHS->getType()->isFloatingPoint())
     Compare = Builder.CreateFCmp(FCmpInst::Predicate(FPPred), LHS, RHS);
-  else if TYPE_UNSIGNED(TREE_TYPE(TREE_OPERAND(exp, 0)))
+  else if (TYPE_UNSIGNED(TREE_TYPE(exp)))
     Compare = Builder.CreateICmp(ICmpInst::Predicate(UIPred), LHS, RHS);
   else
     Compare = Builder.CreateICmp(ICmpInst::Predicate(SIPred), LHS, RHS);





More information about the llvm-commits mailing list