[cfe-commits] r41233 - /cfe/trunk/CodeGen/CGExpr.cpp
Chris Lattner
sabre at nondot.org
Tue Aug 21 10:03:38 PDT 2007
Author: lattner
Date: Tue Aug 21 12:03:38 2007
New Revision: 41233
URL: http://llvm.org/viewvc/llvm-project?rev=41233&view=rev
Log:
simplify code slightly
Modified:
cfe/trunk/CodeGen/CGExpr.cpp
Modified: cfe/trunk/CodeGen/CGExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CodeGen/CGExpr.cpp?rev=41233&r1=41232&r2=41233&view=diff
==============================================================================
--- cfe/trunk/CodeGen/CGExpr.cpp (original)
+++ cfe/trunk/CodeGen/CGExpr.cpp Tue Aug 21 12:03:38 2007
@@ -1251,10 +1251,11 @@
ResultI = Builder.CreateFCmp((llvm::FCmpInst::Predicate)FCmpOpc,
LHS.second, RHS.second, "cmp.i");
} else {
- unsigned Opc = CETy->isUnsignedIntegerType() ? UICmpOpc : SICmpOpc;
- ResultR = Builder.CreateICmp((llvm::ICmpInst::Predicate)Opc,
+ // Complex comparisons can only be equality comparisons. As such, signed
+ // and unsigned opcodes are the same.
+ ResultR = Builder.CreateICmp((llvm::ICmpInst::Predicate)UICmpOpc,
LHS.first, RHS.first, "cmp.r");
- ResultI = Builder.CreateICmp((llvm::ICmpInst::Predicate)Opc,
+ ResultI = Builder.CreateICmp((llvm::ICmpInst::Predicate)UICmpOpc,
LHS.second, RHS.second, "cmp.i");
}
More information about the cfe-commits
mailing list