git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41233 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2007-08-21 17:03:38 +00:00
Родитель 3cbc38bd35
Коммит 32e32e7782
1 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -1251,10 +1251,11 @@ RValue CodeGenFunction::EmitBinaryCompare(const BinaryOperator *E,
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");
}