================
@@ -93,6 +93,29 @@ bool OpenMPClauseEmitter::emitProcBind(
   return false;
 }
 
+bool OpenMPClauseEmitter::emitIf(mlir::omp::IfClauseOps &result) const {
+  for (const OMPClause *clause : clauses) {
+    const auto *ic = dyn_cast<OMPIfClause>(clause);
+    if (!ic)
+      continue;
+
+    Expr *ifCondition = ic->getCondition();
+    mlir::Value ifBoolValue = cgf.evaluateExprAsBool(ifCondition); // !cir.bool
+
+    mlir::Type uIntType = builder.getUIntNTy(1);
+    mlir::Value ifUIntValue =
+        builder.createBoolToInt(ifBoolValue, uIntType); // u1
----------------
andykaylor wrote:

Why can't the bool-to-int cast convert to a signed i1?

https://github.com/llvm/llvm-project/pull/204999
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to