@@ -746,38 +746,25 @@ foreach dim = [1, 2, 3, 4, 5] in {
746
746
747
747
//Prefetch and Prefetchu
748
748
749
- class PREFETCH_INTRS<string InstName> :
749
+ class PREFETCH_INTRS<string InstName, string IntrName > :
750
750
BasicNVPTXInst<(outs), (ins ADDR:$addr),
751
751
InstName,
752
- [(!cast<Intrinsic>(!strconcat("int_nvvm_",
753
- !subst(".", "_", InstName))) addr:$addr)]>,
752
+ [(!cast<Intrinsic>(IntrName) addr:$addr)]>,
754
753
Requires<[hasPTX<80>, hasSM<90>]>;
755
754
756
755
757
- def PREFETCH_L1 : PREFETCH_INTRS<"prefetch.L1">;
758
- def PREFETCH_L2 : PREFETCH_INTRS<"prefetch.L2">;
759
- def PREFETCH_GLOBAL_L1 : PREFETCH_INTRS<"prefetch.global.L1">;
760
- def PREFETCH_LOCAL_L1 : PREFETCH_INTRS<"prefetch.local.L1">;
761
- def PREFETCH_GLOBAL_L2 : PREFETCH_INTRS<"prefetch.global.L2">;
762
- def PREFETCH_LOCAL_L2 : PREFETCH_INTRS<"prefetch.local.L2">;
763
- def PREFETCH_CONST_TENSORMAP : PREFETCH_INTRS<"prefetch.const.tensormap">;
764
- def PREFETCH_GENERIC_TENSORMAP : BasicNVPTXInst<(outs), (ins ADDR:$addr),
765
- "prefetch.tensormap",
766
- [(int_nvvm_prefetch_generic_tensormap addr:$addr)]>,
767
- Requires<[hasPTX<80>, hasSM<90>]>;
768
-
769
- def PREFETCH_GLOBAL_L2_EVICT_NORMAL : BasicNVPTXInst<(outs), (ins ADDR:$addr),
770
- "prefetch.global.L2::evict_normal",
771
- [(int_nvvm_prefetch_global_L2_evict_normal addr:$addr)]>,
772
- Requires<[hasPTX<80>, hasSM<90>]>;
773
-
774
- def PREFETCH_GLOBAL_L2_EVICT_LAST : BasicNVPTXInst<(outs), (ins ADDR:$addr),
775
- "prefetch.global.L2::evict_last",
776
- [(int_nvvm_prefetch_global_L2_evict_last addr:$addr)]>,
777
- Requires<[hasPTX<80>, hasSM<90>]>;
778
-
779
-
780
- def PREFETCHU_L1 : PREFETCH_INTRS<"prefetchu.L1">;
756
+ def PREFETCH_L1 : PREFETCH_INTRS<"prefetch.L1", "int_nvvm_prefetch_L1">;
757
+ def PREFETCH_L2 : PREFETCH_INTRS<"prefetch.L2", "int_nvvm_prefetch_L2">;
758
+ def PREFETCH_GLOBAL_L1 : PREFETCH_INTRS<"prefetch.global.L1", "int_nvvm_prefetch_global_L1">;
759
+ def PREFETCH_LOCAL_L1 : PREFETCH_INTRS<"prefetch.local.L1", "int_nvvm_prefetch_local_L1">;
760
+ def PREFETCH_GLOBAL_L2 : PREFETCH_INTRS<"prefetch.global.L2", "int_nvvm_prefetch_global_L2">;
761
+ def PREFETCH_LOCAL_L2 : PREFETCH_INTRS<"prefetch.local.L2", "int_nvvm_prefetch_local_L2">;
762
+ def PREFETCH_CONST_TENSORMAP : PREFETCH_INTRS<"prefetch.const.tensormap", "int_nvvm_prefetch_const_tensormap">;
763
+ def PREFETCH_GENERIC_TENSORMAP : PREFETCH_INTRS<"prefetch.tensormap", "int_nvvm_prefetch_generic_tensormap">;
764
+ def PREFETCH_GLOBAL_L2_EVICT_NORMAL : PREFETCH_INTRS<"prefetch.global.L2::evict_normal", "int_nvvm_prefetch_global_L2_evict_normal">;
765
+ def PREFETCH_GLOBAL_L2_EVICT_LAST : PREFETCH_INTRS<"prefetch.global.L2::evict_last", "int_nvvm_prefetch_global_L2_evict_last">;
766
+
767
+ def PREFETCHU_L1 : PREFETCH_INTRS<"prefetchu.L1", "int_nvvm_prefetchu_L1">;
781
768
782
769
//Applypriority intrinsics
783
770
class APPLYPRIORITY_L2_INTRS<string addrspace> :
0 commit comments