================
@@ -501,19 +417,88 @@ static mlir::Value emitX86vpcom(CIRGenBuilderTy &builder,
mlir::Location loc,
return builder.createVecCompare(loc, pred, op0, op1);
}
-std::optional<mlir::Value>
-CIRGenFunction::emitX86BuiltinExpr(unsigned builtinID, const CallExpr *expr) {
+static cir::CmpOpKind getCmpPredFromImm(unsigned imm) {
+ switch (imm) {
+ case 0:
+ return cir::CmpOpKind::eq;
+ case 1:
+ return cir::CmpOpKind::lt;
+ case 2:
+ return cir::CmpOpKind::le;
+ case 4:
+ return cir::CmpOpKind::ne;
+ case 5:
+ return cir::CmpOpKind::ge;
+ case 6:
+ return cir::CmpOpKind::gt;
+ default:
+ llvm_unreachable("Unknown condition code");
+ }
+}
+
+static mlir::Value emitX86MaskedCompare(CIRGenBuilderTy &builder,
----------------
YGGkk wrote:
Which function implement this?
https://github.com/llvm/llvm-project/pull/174318
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits