[llvm-commits] [llvm-gcc-4.2] r53436 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Dale Johannesen
dalej at apple.com
Thu Jul 10 16:56:34 PDT 2008
Author: johannes
Date: Thu Jul 10 18:56:33 2008
New Revision: 53436
URL: http://llvm.org/viewvc/llvm-project?rev=53436&view=rev
Log:
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/trunk/gcc/llvm-convert.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=53436&r1=53435&r2=53436&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Thu Jul 10 18:56:33 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