зеркало из https://github.com/microsoft/clang-1.git
simplify code slightly
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41233 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
3cbc38bd35
Коммит
32e32e7782
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче