forked from OSchip/llvm-project
parent
755a5a9933
commit
bf1bd0dcc7
|
@ -1251,10 +1251,11 @@ RValue CodeGenFunction::EmitBinaryCompare(const BinaryOperator *E,
|
||||||
ResultI = Builder.CreateFCmp((llvm::FCmpInst::Predicate)FCmpOpc,
|
ResultI = Builder.CreateFCmp((llvm::FCmpInst::Predicate)FCmpOpc,
|
||||||
LHS.second, RHS.second, "cmp.i");
|
LHS.second, RHS.second, "cmp.i");
|
||||||
} else {
|
} else {
|
||||||
unsigned Opc = CETy->isUnsignedIntegerType() ? UICmpOpc : SICmpOpc;
|
// Complex comparisons can only be equality comparisons. As such, signed
|
||||||
ResultR = Builder.CreateICmp((llvm::ICmpInst::Predicate)Opc,
|
// and unsigned opcodes are the same.
|
||||||
|
ResultR = Builder.CreateICmp((llvm::ICmpInst::Predicate)UICmpOpc,
|
||||||
LHS.first, RHS.first, "cmp.r");
|
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");
|
LHS.second, RHS.second, "cmp.i");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue