[llvm] [NVPTX] Add intrinsic support for specialized prmt variants (PR #140951)
Alex MacLean via llvm-commits
llvm-commits at lists.llvm.org
Thu May 22 11:05:07 PDT 2025
================
@@ -745,9 +745,23 @@ class NVVMBuiltin :
}
let TargetPrefix = "nvvm" in {
- def int_nvvm_prmt : NVVMBuiltin,
- DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
- [IntrNoMem, IntrSpeculatable]>;
+
+ // PRMT - permute
+
+ let IntrProperties = [IntrNoMem, IntrSpeculatable] in {
+ def int_nvvm_prmt : NVVMBuiltin,
+ DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty]>;
+
+ foreach mode = ["f4e", "b4e"] in
+ def int_nvvm_prmt_ # mode :
+ DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty]>;
+
+ // Note: these variants also have 2 source operands but only one will ever
+ // be used so we eliminate the other operand in the IR.
----------------
AlexMaclean wrote:
Sure, added!
https://github.com/llvm/llvm-project/pull/140951
More information about the llvm-commits
mailing list