@@ -790,15 +790,19 @@ def PREFETCH_GLOBAL_L2_EVICT_LAST : NVPTXInst<(outs), (ins Int64Regs:$addr),
790790def PREFETCHU_L1 : PREFETCH_INTRS<"prefetchu.L1">;
791791
792792//Applypriority intrinsics
793- class APPLYPRIORITY_L2_INTRS<string InstName> :
793+ class APPLYPRIORITY_STRINGS<string addr> {
794+ string InstName = StrJoin<".", ["applypriority", !if(!eq(addr, ""), "", addr) , "L2::evict_normal"]>.ret;
795+ string IntrName = StrJoin<"_", ["int_nvvm_applypriority", !if(!eq(addr, ""), "", addr) , "L2_evict_normal"]>.ret;
796+ }
797+ class APPLYPRIORITY_L2_INTRS<string addr> :
794798 NVPTXInst<(outs), (ins Int64Regs:$addr, Int64Regs:$size),
795- InstName # " [$addr], $size;",
796- [(!cast<Intrinsic>("int_nvvm_" # !subst("::", "_", !subst(".", "_", InstName)) )
799+ APPLYPRIORITY_STRINGS<addr>. InstName # " [$addr], $size;",
800+ [(!cast<Intrinsic>(APPLYPRIORITY_STRINGS<addr>.IntrName )
797801 i64:$addr, i64:$size)]>,
798802 Requires<[hasPTX<74>, hasSM<80>]>;
799803
800- def APPLYPRIORITY_L2_EVICT_NORMAL : APPLYPRIORITY_L2_INTRS<"applypriority.L2::evict_normal ">;
801- def APPLYPRIORITY_GLOBAL_L2_EVICT_NORMAL : APPLYPRIORITY_L2_INTRS<"applypriority. global.L2::evict_normal ">;
804+ def APPLYPRIORITY_L2_EVICT_NORMAL : APPLYPRIORITY_L2_INTRS<"">;
805+ def APPLYPRIORITY_GLOBAL_L2_EVICT_NORMAL : APPLYPRIORITY_L2_INTRS<"global">;
802806
803807//-----------------------------------
804808// MBarrier Functions
0 commit comments