@@ -911,52 +911,68 @@ foreach name = ["MemoryBarrier"] in {
911911// 3.32.21. Group and Subgroup Instructions
912912
913913foreach name = ["GroupAsyncCopy"] in {
914- // TODO: Allow enum flags instead of UInt ?
915- // TODO: We should enforce that the UInt must be a literal.
916- def : SPVBuiltin<name, [Event, UInt, PointerType<AGenTypeN, LocalAS>, PointerType<ConstType<AGenTypeN>, GlobalAS>, Size, Size, Event], Attr.Convergent>;
917- def : SPVBuiltin<name, [Event, UInt, PointerType<AGenTypeN, GlobalAS>, PointerType<ConstType<AGenTypeN>, LocalAS>, Size, Size, Event], Attr.Convergent>;
914+ // TODO: Allow enum flags instead of Int ?
915+ // TODO: We should enforce that the Int must be a literal.
916+ def : SPVBuiltin<name,
917+ [Event, Int, PointerType<AGenTypeN, LocalAS>,
918+ PointerType<ConstType<AGenTypeN>, GlobalAS>, Size, Size,
919+ Event],
920+ Attr.Convergent>;
921+ def : SPVBuiltin<name,
922+ [Event, Int, PointerType<AGenTypeN, GlobalAS>,
923+ PointerType<ConstType<AGenTypeN>, LocalAS>, Size, Size,
924+ Event],
925+ Attr.Convergent>;
918926}
919927
920928foreach name = ["GroupWaitEvents"] in {
921- def : SPVBuiltin<name, [Void, UInt, Int, PointerType<Event, DefaultAS>], Attr.Convergent>;
922- def : SPVBuiltin<name, [Void, UInt, Int, PointerType<Event, PrivateAS>], Attr.Convergent>;
923- def : SPVBuiltin<name, [Void, UInt, Int, PointerType<Event, GenericAS>], Attr.Convergent>;
929+ def : SPVBuiltin<name, [Void, Int, Int, PointerType<Event, DefaultAS>],
930+ Attr.Convergent>;
931+ def : SPVBuiltin<name, [Void, Int, Int, PointerType<Event, PrivateAS>],
932+ Attr.Convergent>;
933+ def : SPVBuiltin<name, [Void, Int, Int, PointerType<Event, GenericAS>],
934+ Attr.Convergent>;
924935}
925936
926937foreach name = ["GroupAll", "GroupAny"] in {
927- def : SPVBuiltin<name, [Bool, UInt , Bool], Attr.Convergent>;
938+ def : SPVBuiltin<name, [Bool, Int , Bool], Attr.Convergent>;
928939}
929940
930941foreach name = ["GroupBroadcast"] in {
931942 foreach IDType = TLAllInts.List in {
932- def : SPVBuiltin<name, [AGenTypeN, UInt, AGenTypeN, IDType], Attr.Convergent>;
933- def : SPVBuiltin<name, [AGenTypeN, UInt, AGenTypeN, VectorType<IDType, 2>], Attr.Convergent>;
934- def : SPVBuiltin<name, [AGenTypeN, UInt, AGenTypeN, VectorType<IDType, 3>], Attr.Convergent>;
935- def : SPVBuiltin<name, [Bool, UInt, Bool, IDType], Attr.Convergent>;
936- def : SPVBuiltin<name, [Bool, UInt, Bool, VectorType<IDType, 2>], Attr.Convergent>;
937- def : SPVBuiltin<name, [Bool, UInt, Bool, VectorType<IDType, 3>], Attr.Convergent>;
943+ def : SPVBuiltin<name, [AGenTypeN, Int, AGenTypeN, IDType],
944+ Attr.Convergent>;
945+ def : SPVBuiltin<name, [AGenTypeN, Int, AGenTypeN, VectorType<IDType, 2>],
946+ Attr.Convergent>;
947+ def : SPVBuiltin<name, [AGenTypeN, Int, AGenTypeN, VectorType<IDType, 3>],
948+ Attr.Convergent>;
949+ def : SPVBuiltin<name, [Bool, Int, Bool, IDType], Attr.Convergent>;
950+ def : SPVBuiltin<name, [Bool, Int, Bool, VectorType<IDType, 2>],
951+ Attr.Convergent>;
952+ def : SPVBuiltin<name, [Bool, Int, Bool, VectorType<IDType, 3>],
953+ Attr.Convergent>;
938954 }
939955}
940956
941957foreach name = ["GroupIAdd", "GroupIMulKHR", "GroupBitwiseOrKHR",
942958 "GroupBitwiseXorKHR", "GroupBitwiseAndKHR"] in {
943- def : SPVBuiltin<name, [AIGenTypeN, UInt, UInt , AIGenTypeN], Attr.Convergent>;
959+ def : SPVBuiltin<name, [AIGenTypeN, Int, Int , AIGenTypeN], Attr.Convergent>;
944960}
945961
946962foreach name = ["GroupFAdd", "GroupFMin", "GroupFMax",
947963 "GroupFMulKHR"] in {
948- def : SPVBuiltin<name, [FGenTypeN, UInt, UInt , FGenTypeN], Attr.Convergent>;
964+ def : SPVBuiltin<name, [FGenTypeN, Int, Int , FGenTypeN], Attr.Convergent>;
949965}
950966
951967foreach name = ["GroupUMin", "GroupUMax"] in {
952- def : SPVBuiltin<name, [AUIGenTypeN, UInt, UInt , AUIGenTypeN], Attr.Convergent>;
968+ def : SPVBuiltin<name, [AUIGenTypeN, Int, Int , AUIGenTypeN], Attr.Convergent>;
953969}
954970
955971foreach name = ["GroupSMin", "GroupSMax"] in {
956- def : SPVBuiltin<name, [ASIGenTypeN, UInt, UInt , ASIGenTypeN], Attr.Convergent>;
972+ def : SPVBuiltin<name, [ASIGenTypeN, Int, Int , ASIGenTypeN], Attr.Convergent>;
957973}
958974
959975// TODO: These builtins need to support vectors of bool.
960976foreach name = ["GroupLogicalAndKHR", "GroupLogicalOrKHR"] in {
961- def : SPVBuiltin<name, [Bool, UInt, UInt , Bool], Attr.Convergent>;
977+ def : SPVBuiltin<name, [Bool, Int, Int , Bool], Attr.Convergent>;
962978}
0 commit comments