================
@@ -326,7 +324,47 @@ class AggExprEmitter : public StmtVisitor<AggExprEmitter> {
Visit(e->getRHS());
}
void VisitBinCmp(const BinaryOperator *e) {
- cgf.cgm.errorNYI(e->getSourceRange(), "AggExprEmitter: VisitBinCmp");
+ const ComparisonCategoryInfo &CompCategoryInfo =
+ cgf.getContext().CompCategories.getInfoForType(e->getType());
+
+ QualType ArgTy = e->getLHS()->getType();
+ if (ArgTy->isIntegralOrEnumerationType() || ArgTy->isRealFloatingType() ||
+ ArgTy->isNullPtrType() || ArgTy->isPointerType() ||
+ ArgTy->isMemberPointerType()) {
+ mlir::Value lhs = cgf.emitScalarExpr(e->getLHS());
+ mlir::Value rhs = cgf.emitScalarExpr(e->getRHS());
----------------
ZakyHermawan wrote:
Is it guaranteed that the lhs has the same type as the rhs at this point ?
If not, maybe we need to check it.
https://github.com/llvm/llvm-project/pull/186294
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits