[Mlir-commits] [mlir] [MLIR][NVVM][Refactor] Refactor intrinsic lowering for NVVM Ops (PR #157079)

Rajat Bajpai llvmlistbot at llvm.org
Wed Sep 17 04:25:47 PDT 2025


================
@@ -55,10 +55,21 @@ enum NVVMMemorySpace {
   kSharedClusterMemorySpace = 7,
 };
 
-/// A pair type of LLVM's Intrinsic ID and args (which are llvm values).
-/// This type is returned by the getIntrinsicIDAndArgs() methods.
-using IDArgPair =
-    std::pair<llvm::Intrinsic::ID, llvm::SmallVector<llvm::Value *>>;
+/// A struct of LLVM's Intrinsic ID, args (which are llvm values),
+/// and args types (which are llvm types).
+/// Args types are only required for overloaded intrinsics to provide the
+/// correct argument types to the createIntrinsicCall() method.
+/// This type is returned by the getIIDAndArgsWithTypes() methods.
+struct IIDArgsWithTypes {
+  IIDArgsWithTypes(llvm::Intrinsic::ID id,
----------------
rajatbajpai wrote:

I see, can't we use below syntax?
```
return cond == some_cond ? S1{a1, b1} : S1{a2, b2};
```

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


More information about the Mlir-commits mailing list