[llvm] [LLVM][NVPTX]: Add intrinsic for setmaxnreg (PR #77289)

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 8 11:52:26 PST 2024


================
@@ -164,6 +164,10 @@ def True : Predicate<"true">;
 class hasPTX<int version>: Predicate<"Subtarget->getPTXVersion() >= " # version>;
 class hasSM<int version>: Predicate<"Subtarget->getSmVersion() >= " # version>;
 
+// Explicit records for arch-accelerated SM versions
+def hasSM90a : Predicate<"Subtarget->getSmVersion() == 90"
----------------
Artem-B wrote:

`getSmVersion()` is redundant here as `getFullSmVersion()` provides a more specific version comparison.

On a side note, now that we have to deal with `sm_??a` variants we may provide a generic `hasSMA<N>`.
`hasSM90a` here is fine for now.

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


More information about the llvm-commits mailing list