[Mlir-commits] [mlir] [mlir][NVVM] Add InferTypeOpInterface to sync and ldmatrix ops (PR #188238)

Guray Ozen llvmlistbot at llvm.org
Wed Mar 25 02:36:54 PDT 2026


================
@@ -2244,6 +2244,20 @@ LogicalResult ShflOp::verify() {
   return success();
 }
 
+LogicalResult
+ShflOp::inferReturnTypes(MLIRContext *context, std::optional<Location> location,
+                         ShflOp::Adaptor adaptor,
+                         SmallVectorImpl<Type> &inferredReturnTypes) {
+  Type valType = adaptor.getVal().getType();
+  if (adaptor.getReturnValueAndIsValid()) {
+    inferredReturnTypes.push_back(LLVM::LLVMStructType::getLiteral(
+        context, {valType, IntegerType::get(context, 1)}));
+  } else {
----------------
grypp wrote:

nit : same code below doesn't use `{` on trivial line and this is the way slightly preferred. Can we have the same style? 

https://github.com/llvm/llvm-project/pull/188238


More information about the Mlir-commits mailing list