[clang] [CIR][NVPTX] Lower __nvvm_bar0_{and, or, popc} builtins (PR #221255)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 4 12:51:39 PDT 2026
================
@@ -69,6 +69,23 @@ static mlir::Value emitUnaryNVVMIntrinsic(CIRGenFunction &cgf,
.getResult();
}
+static mlir::Value emitBar0Reduction(CIRGenFunction &cgf, const CallExpr *expr,
+ llvm::StringRef intrinsicName,
+ bool returnsPred) {
+ CIRGenBuilderTy &builder = cgf.getBuilder();
+ mlir::Location loc = cgf.getLoc(expr->getExprLoc());
+ mlir::Value zero = builder.getConstInt(loc, builder.getSInt32Ty(), 0);
----------------
andykaylor wrote:
```suggestion
mlir::Type si32Ty = builder.getSInt32Ty();
mlir::Value zero = builder.getZero(loc. si32Ty);
```
https://github.com/llvm/llvm-project/pull/221255
More information about the cfe-commits
mailing list