[Mlir-commits] [mlir] [mlir][spirv] Add spirv-to-llvm conversion for group operations (PR #115501)
Victor Perez
llvmlistbot at llvm.org
Fri Nov 8 08:17:35 PST 2024
================
@@ -1038,18 +1040,23 @@ static LLVM::LLVMFuncOp lookupOrCreateSPIRVFn(Operation *symbolTable,
symbolTable->getLoc(), name,
LLVM::LLVMFunctionType::get(resultType, paramTypes));
func.setCConv(LLVM::cconv::CConv::SPIR_FUNC);
- func.setConvergent(true);
+ if (convergent) {
+ func.setConvergent(true);
+ }
func.setNoUnwind(true);
func.setWillReturn(true);
return func;
}
static LLVM::CallOp createSPIRVBuiltinCall(Location loc, OpBuilder &builder,
LLVM::LLVMFuncOp func,
- ValueRange args) {
+ ValueRange args,
+ bool convergent = true) {
auto call = builder.create<LLVM::CallOp>(loc, func, args);
call.setCConv(func.getCConv());
- call.setConvergentAttr(func.getConvergentAttr());
+ if (convergent) {
+ call.setConvergentAttr(func.getConvergentAttr());
+ }
----------------
victor-eds wrote:
```suggestion
call.setConvergentAttr(func.getConvergentAttr());
```
same
https://github.com/llvm/llvm-project/pull/115501
More information about the Mlir-commits
mailing list