@@ -911,52 +911,68 @@ foreach name = ["MemoryBarrier"] in {
911
911
// 3.32.21. Group and Subgroup Instructions
912
912
913
913
foreach 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>;
918
926
}
919
927
920
928
foreach 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>;
924
935
}
925
936
926
937
foreach name = ["GroupAll", "GroupAny"] in {
927
- def : SPVBuiltin<name, [Bool, UInt , Bool], Attr.Convergent>;
938
+ def : SPVBuiltin<name, [Bool, Int , Bool], Attr.Convergent>;
928
939
}
929
940
930
941
foreach name = ["GroupBroadcast"] in {
931
942
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>;
938
954
}
939
955
}
940
956
941
957
foreach name = ["GroupIAdd", "GroupIMulKHR", "GroupBitwiseOrKHR",
942
958
"GroupBitwiseXorKHR", "GroupBitwiseAndKHR"] in {
943
- def : SPVBuiltin<name, [AIGenTypeN, UInt, UInt , AIGenTypeN], Attr.Convergent>;
959
+ def : SPVBuiltin<name, [AIGenTypeN, Int, Int , AIGenTypeN], Attr.Convergent>;
944
960
}
945
961
946
962
foreach name = ["GroupFAdd", "GroupFMin", "GroupFMax",
947
963
"GroupFMulKHR"] in {
948
- def : SPVBuiltin<name, [FGenTypeN, UInt, UInt , FGenTypeN], Attr.Convergent>;
964
+ def : SPVBuiltin<name, [FGenTypeN, Int, Int , FGenTypeN], Attr.Convergent>;
949
965
}
950
966
951
967
foreach name = ["GroupUMin", "GroupUMax"] in {
952
- def : SPVBuiltin<name, [AUIGenTypeN, UInt, UInt , AUIGenTypeN], Attr.Convergent>;
968
+ def : SPVBuiltin<name, [AUIGenTypeN, Int, Int , AUIGenTypeN], Attr.Convergent>;
953
969
}
954
970
955
971
foreach name = ["GroupSMin", "GroupSMax"] in {
956
- def : SPVBuiltin<name, [ASIGenTypeN, UInt, UInt , ASIGenTypeN], Attr.Convergent>;
972
+ def : SPVBuiltin<name, [ASIGenTypeN, Int, Int , ASIGenTypeN], Attr.Convergent>;
957
973
}
958
974
959
975
// TODO: These builtins need to support vectors of bool.
960
976
foreach name = ["GroupLogicalAndKHR", "GroupLogicalOrKHR"] in {
961
- def : SPVBuiltin<name, [Bool, UInt, UInt , Bool], Attr.Convergent>;
977
+ def : SPVBuiltin<name, [Bool, Int, Int , Bool], Attr.Convergent>;
962
978
}
0 commit comments