Skip to content

Reapply "[libspirv] Define schar overloads via remangling; not source… #18864

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 26 additions & 23 deletions clang/lib/Sema/SPIRVBuiltins.td
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,7 @@ class ConstOCLSPVBuiltin<string _Name, list<Type> _Signature> :

// OpenCL v1.0/1.2/2.0 s6.1.1: Built-in Scalar Data Types.
def Bool : IntType<"bool", QualType<"Context.BoolTy">, 1>;
def TrueChar : IntType<"_char", QualType<"Context.CharTy", 0, 1>, 8>;
def Char : IntType<"char", QualType<"Context.SignedCharTy", 0, 1>, 8>;
def Char : IntType<"char", QualType<"Context.CharTy", 0, 1>, 8>;
def SChar : IntType<"schar", QualType<"Context.SignedCharTy", 0, 1>, 8>;
def UChar : UIntType<"uchar", QualType<"Context.UnsignedCharTy">, 8>;
def Short : IntType<"short", QualType<"Context.ShortTy", 0, 1>, 16>;
Expand Down Expand Up @@ -356,19 +355,20 @@ def Vec16 : IntList<"Vec16", [16]>;
def Vec1234 : IntList<"Vec1234", [1, 2, 3, 4]>;

// Type lists.
def TLAll : TypeList<[Char, UChar, Short, UShort, Int, UInt, Long, ULong, Float, Double, Half]>;
def TLAllUnsigned : TypeList<[UChar, UChar, UShort, UShort, UInt, UInt, ULong, ULong, UInt, ULong, UShort]>;
def TLAllWithBool : TypeList<[Bool, Char, UChar, Short, UShort, Int, UInt, Long,
def TLAll : TypeList<[Char, SChar, UChar, Short, UShort, Int, UInt, Long, ULong, Float, Double, Half]>;
def TLAllUnsigned : TypeList<[UChar, UChar, UChar, UShort, UShort, UInt, UInt, ULong, ULong, UInt, ULong, UShort]>;
def TLAllWithBool : TypeList<[Bool, Char, SChar, UChar, Short, UShort, Int, UInt, Long,
ULong, Float, Double, Half]>;
def TLFloat : TypeList<[Float, Double, Half]>;
// FIXME: handle properly char (signed or unsigned depending on host)
def TLSignedInts : TypeList<[Char, Short, Int, Long]>;
def TLUnsignedInts : TypeList<[UChar, UShort, UInt, ULong]>;
def TLSignedInts : TypeList<[Char, SChar, Short, Int, Long]>;
def TLUIToSIInts : TypeList<[UChar, UChar, UShort, UInt, ULong]>;
def TLUnsignedInts : TypeList<[UChar, UShort, UInt, ULong]>;

// Signed to Unsigned conversion
// FIXME: handle properly char (signed or unsigned depending on host)
def TLSToUSignedInts : TypeList<[Char, Short, Int, Long]>;
def TLSToUUnsignedInts : TypeList<[UChar, UShort, UInt, ULong]>;
def TLSToUSignedInts : TypeList<[Char, SChar, Short, Int, Long]>;
def TLSToUUnsignedInts : TypeList<[UChar, UChar, UShort, UInt, ULong]>;

def TLIntLongFloats : TypeList<[Int, UInt, Long, ULong, Float, Double, Half]>;

Expand All @@ -377,7 +377,7 @@ def TLIntLongFloats : TypeList<[Int, UInt, Long, ULong, Float, Double, Half]>;
// uchar abs(uchar).
def TLAllUIntsTwice : TypeList<[UChar, UChar, UChar, UShort, UShort, UInt, UInt, ULong, ULong]>;

def TLAllInts : TypeList<[Char, UChar, Short, UShort, Int, UInt, Long, ULong]>;
def TLAllInts : TypeList<[Char, SChar, UChar, Short, UShort, Int, UInt, Long, ULong]>;

// GenType definitions for multiple base types (e.g. all floating point types,
// or all integer types).
Expand All @@ -394,6 +394,8 @@ def AIGenType1 : GenericType<"AIGenType1", TLAllInts, Vec1>;
def AIGenTypeN : GenericType<"AIGenTypeN", TLAllInts, VecAndScalar>;
def AUIGenTypeN : GenericType<"AUIGenTypeN", TLUnsignedInts, VecAndScalar>;
def ASIGenTypeN : GenericType<"ASIGenTypeN", TLSignedInts, VecAndScalar>;
// unsigned integers matching 1:1 with signed ints
def AUIToSIGenTypeN : GenericType<"AUIToSIGenTypeN", TLUIToSIInts, VecAndScalar>;
def AIGenTypeNNoScalar : GenericType<"AIGenTypeNNoScalar", TLAllInts, VecNoScalar>;
// All integer to unsigned
def AI2UGenTypeN : GenericType<"AI2UGenTypeN", TLAllUIntsTwice, VecAndScalar>;
Expand All @@ -403,6 +405,7 @@ def SGenTypeN : GenericType<"SGenTypeN", TLSignedInts, VecAndScalar
// Unsigned integer
def UGenType1 : GenericType<"UGenType1", TLUnsignedInts, Vec1>;
def UGenTypeN : GenericType<"UGenTypeN", TLUnsignedInts, VecAndScalar>;
def UToSGenTypeN : GenericType<"UToSGenTypeN", TLUIToSIInts, VecAndScalar>;
def UInt4 : GenericType<"UInt4", TypeList<[UInt]>, Vec4>;
// Float
def FGenType1 : GenericType<"FGenType1", TLFloat, Vec1>;
Expand All @@ -412,7 +415,7 @@ def IntLongFloatGenType1 : GenericType<"IntLongFloatGenType1", TLIntLongFloats

// GenType definitions for every single base type (e.g. fp32 only).
// Names are like: GenTypeFloatVecAndScalar.
foreach Type = [Char, UChar, SChar, Short, UShort,
foreach Type = [Char, SChar, UChar, Short, UShort,
Int, UInt, Long, ULong,
Float, Double, Half] in {
foreach VecSizes = [VecAndScalar, VecNoScalar] in {
Expand Down Expand Up @@ -550,9 +553,9 @@ foreach name = ["clz", "ctz", "popcount"] in {

def : ConstOCLSPVBuiltin<"rotate", [AIGenTypeN, AIGenTypeN, AIGenTypeN]>;

def : ConstOCLSPVBuiltin<"s_abs", [AUIGenTypeN, ASIGenTypeN]>;
def : ConstOCLSPVBuiltin<"s_abs", [AUIToSIGenTypeN, ASIGenTypeN]>;

def : ConstOCLSPVBuiltin<"s_abs_diff", [AUIGenTypeN, ASIGenTypeN, ASIGenTypeN]>;
def : ConstOCLSPVBuiltin<"s_abs_diff", [AUIToSIGenTypeN, ASIGenTypeN, ASIGenTypeN]>;

foreach name = ["s_add_sat",
"s_hadd", "s_rhadd",
Expand Down Expand Up @@ -652,9 +655,9 @@ def : ConstOCLSPVBuiltin<"bitselect", [AGenTypeN, AGenTypeN, AGenTypeN, AGenType

foreach name = ["select"] in {
def : ConstOCLSPVBuiltin<name, [SGenTypeN, SGenTypeN, SGenTypeN, SGenTypeN]>;
def : ConstOCLSPVBuiltin<name, [SGenTypeN, SGenTypeN, SGenTypeN, UGenTypeN]>;
def : ConstOCLSPVBuiltin<name, [SGenTypeN, SGenTypeN, SGenTypeN, UToSGenTypeN]>;
def : ConstOCLSPVBuiltin<name, [UGenTypeN, UGenTypeN, UGenTypeN, UGenTypeN]>;
def : ConstOCLSPVBuiltin<name, [UGenTypeN, UGenTypeN, UGenTypeN, SGenTypeN]>;
def : ConstOCLSPVBuiltin<name, [UToSGenTypeN, UToSGenTypeN, UToSGenTypeN, SGenTypeN]>;
def : ConstOCLSPVBuiltin<name, [GenTypeFloatVecAndScalar, GenTypeFloatVecAndScalar, GenTypeFloatVecAndScalar, GenTypeUIntVecAndScalar]>;
def : ConstOCLSPVBuiltin<name, [GenTypeDoubleVecAndScalar, GenTypeDoubleVecAndScalar, GenTypeDoubleVecAndScalar, GenTypeULongVecAndScalar]>;
def : ConstOCLSPVBuiltin<name, [GenTypeHalfVecAndScalar, GenTypeHalfVecAndScalar, GenTypeHalfVecAndScalar, GenTypeUShortVecAndScalar]>;
Expand Down Expand Up @@ -872,16 +875,16 @@ foreach name = ["Dot"] in {
}

foreach name = ["Any", "All"] in {
def : SPVBuiltin<name, [Bool, GenTypeSCharVecNoScalar], Attr.Const>;
def : SPVBuiltin<name, [Bool, GenTypeCharVecNoScalar], Attr.Const>;
}

foreach name = ["IsNan", "IsInf", "IsFinite", "IsNormal", "SignBitSet"] in {
def : SPVBuiltin<name, [Bool, Float], Attr.Const>;
def : SPVBuiltin<name, [Bool, Double], Attr.Const>;
def : SPVBuiltin<name, [Bool, Half], Attr.Const>;
def : SPVBuiltin<name, [GenTypeSCharVecNoScalar, GenTypeFloatVecNoScalar], Attr.Const>;
def : SPVBuiltin<name, [GenTypeSCharVecNoScalar, GenTypeDoubleVecNoScalar], Attr.Const>;
def : SPVBuiltin<name, [GenTypeSCharVecNoScalar, GenTypeHalfVecNoScalar], Attr.Const>;
def : SPVBuiltin<name, [GenTypeCharVecNoScalar, GenTypeFloatVecNoScalar], Attr.Const>;
def : SPVBuiltin<name, [GenTypeCharVecNoScalar, GenTypeDoubleVecNoScalar], Attr.Const>;
def : SPVBuiltin<name, [GenTypeCharVecNoScalar, GenTypeHalfVecNoScalar], Attr.Const>;
}

foreach name = ["LessOrGreater",
Expand All @@ -895,9 +898,9 @@ foreach name = ["LessOrGreater",
def : SPVBuiltin<name, [Bool, Float, Float], Attr.Const>;
def : SPVBuiltin<name, [Bool, Double, Double], Attr.Const>;
def : SPVBuiltin<name, [Bool, Half, Half], Attr.Const>;
def : SPVBuiltin<name, [GenTypeSCharVecNoScalar, GenTypeFloatVecNoScalar, GenTypeFloatVecNoScalar], Attr.Const>;
def : SPVBuiltin<name, [GenTypeSCharVecNoScalar, GenTypeDoubleVecNoScalar, GenTypeDoubleVecNoScalar], Attr.Const>;
def : SPVBuiltin<name, [GenTypeSCharVecNoScalar, GenTypeHalfVecNoScalar, GenTypeHalfVecNoScalar], Attr.Const>;
def : SPVBuiltin<name, [GenTypeCharVecNoScalar, GenTypeFloatVecNoScalar, GenTypeFloatVecNoScalar], Attr.Const>;
def : SPVBuiltin<name, [GenTypeCharVecNoScalar, GenTypeDoubleVecNoScalar, GenTypeDoubleVecNoScalar], Attr.Const>;
def : SPVBuiltin<name, [GenTypeCharVecNoScalar, GenTypeHalfVecNoScalar, GenTypeHalfVecNoScalar], Attr.Const>;
}

foreach name = ["BitCount"] in {
Expand Down Expand Up @@ -989,7 +992,7 @@ foreach name = ["GroupLogicalAndKHR", "GroupLogicalOrKHR"] in {

def SubgroupShuffleINTELVecType
: GenericType<"SubgroupShuffleINTELVecType",
TypeList<[Char, UChar, Short, UShort, Int, UInt, Float]>,
TypeList<[Char, SChar, UChar, Short, UShort, Int, UInt, Float]>,
VecNoScalar>;

foreach name = ["SubgroupShuffleINTEL", "SubgroupShuffleXorINTEL"] in {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ template <class T> void test_logical() {
void test() {
test_with_bool<bool>();
test_with_bool<char>();
test_with_bool<signed char>();
test_with_bool<unsigned char>();
test_with_bool<short>();
test_with_bool<unsigned short>();
Expand All @@ -199,13 +200,15 @@ void test() {
test_with_bool<double>();

test_integer<char>();
test_integer<signed char>();
test_integer<unsigned char>();
test_integer<short>();
test_integer<unsigned short>();
test_integer<int>();
test_integer<unsigned int>();

test_signed<char>();
test_signed<signed char>();
test_signed<short>();
test_signed<int>();

Expand All @@ -232,13 +235,20 @@ void test() {
// CHECK: call noundef zeroext i1 @_Z33__spirv_GroupNonUniformShuffleXoribj
// CHECK: call noundef zeroext i1 @_Z32__spirv_GroupNonUniformShuffleUpibj
// CHECK: call noundef zeroext i1 @_Z34__spirv_GroupNonUniformShuffleDownibj
// CHECK: call noundef zeroext i1 @_Z31__spirv_GroupNonUniformAllEqualii
// CHECK: call noundef i32 @_Z32__spirv_GroupNonUniformBroadcastiij
// CHECK: call noundef i32 @_Z37__spirv_GroupNonUniformBroadcastFirstii
// CHECK: call noundef i32 @_Z30__spirv_GroupNonUniformShuffleiij
// CHECK: call noundef i32 @_Z33__spirv_GroupNonUniformShuffleXoriij
// CHECK: call noundef i32 @_Z32__spirv_GroupNonUniformShuffleUpiij
// CHECK: call noundef i32 @_Z34__spirv_GroupNonUniformShuffleDowniij
// CHECK: call noundef zeroext i1 @_Z31__spirv_GroupNonUniformAllEqualic
// CHECK: call noundef signext i8 @_Z32__spirv_GroupNonUniformBroadcasticj
// CHECK: call noundef signext i8 @_Z37__spirv_GroupNonUniformBroadcastFirstic
// CHECK: call noundef signext i8 @_Z30__spirv_GroupNonUniformShuffleicj
// CHECK: call noundef signext i8 @_Z33__spirv_GroupNonUniformShuffleXoricj
// CHECK: call noundef signext i8 @_Z32__spirv_GroupNonUniformShuffleUpicj
// CHECK: call noundef signext i8 @_Z34__spirv_GroupNonUniformShuffleDownicj
// CHECK: call noundef zeroext i1 @_Z31__spirv_GroupNonUniformAllEqualia
// CHECK: call noundef signext i8 @_Z32__spirv_GroupNonUniformBroadcastiaj
// CHECK: call noundef signext i8 @_Z37__spirv_GroupNonUniformBroadcastFirstia
// CHECK: call noundef signext i8 @_Z30__spirv_GroupNonUniformShuffleiaj
// CHECK: call noundef signext i8 @_Z33__spirv_GroupNonUniformShuffleXoriaj
// CHECK: call noundef signext i8 @_Z32__spirv_GroupNonUniformShuffleUpiaj
// CHECK: call noundef signext i8 @_Z34__spirv_GroupNonUniformShuffleDowniaj
// CHECK: call noundef zeroext i1 @_Z31__spirv_GroupNonUniformAllEqualih
// CHECK: call noundef zeroext i8 @_Z32__spirv_GroupNonUniformBroadcastihj
// CHECK: call noundef zeroext i8 @_Z37__spirv_GroupNonUniformBroadcastFirstih
Expand Down Expand Up @@ -295,16 +305,26 @@ void test() {
// CHECK: call noundef double @_Z33__spirv_GroupNonUniformShuffleXoridj
// CHECK: call noundef double @_Z32__spirv_GroupNonUniformShuffleUpidj
// CHECK: call noundef double @_Z34__spirv_GroupNonUniformShuffleDownidj
// CHECK: call noundef i32 @_Z27__spirv_GroupNonUniformIAddiii
// CHECK: call noundef i32 @_Z27__spirv_GroupNonUniformIAddiiij
// CHECK: call noundef i32 @_Z27__spirv_GroupNonUniformIMuliii
// CHECK: call noundef i32 @_Z27__spirv_GroupNonUniformIMuliiij
// CHECK: call noundef i32 @_Z33__spirv_GroupNonUniformBitwiseAndiii
// CHECK: call noundef i32 @_Z33__spirv_GroupNonUniformBitwiseAndiiij
// CHECK: call noundef i32 @_Z32__spirv_GroupNonUniformBitwiseOriii
// CHECK: call noundef i32 @_Z32__spirv_GroupNonUniformBitwiseOriiij
// CHECK: call noundef i32 @_Z33__spirv_GroupNonUniformBitwiseXoriii
// CHECK: call noundef i32 @_Z33__spirv_GroupNonUniformBitwiseXoriiij
// CHECK: call noundef signext i8 @_Z27__spirv_GroupNonUniformIAddiic
// CHECK: call noundef signext i8 @_Z27__spirv_GroupNonUniformIAddiicj
// CHECK: call noundef signext i8 @_Z27__spirv_GroupNonUniformIMuliic
// CHECK: call noundef signext i8 @_Z27__spirv_GroupNonUniformIMuliicj
// CHECK: call noundef signext i8 @_Z33__spirv_GroupNonUniformBitwiseAndiic
// CHECK: call noundef signext i8 @_Z33__spirv_GroupNonUniformBitwiseAndiicj
// CHECK: call noundef signext i8 @_Z32__spirv_GroupNonUniformBitwiseOriic
// CHECK: call noundef signext i8 @_Z32__spirv_GroupNonUniformBitwiseOriicj
// CHECK: call noundef signext i8 @_Z33__spirv_GroupNonUniformBitwiseXoriic
// CHECK: call noundef signext i8 @_Z33__spirv_GroupNonUniformBitwiseXoriicj
// CHECK: call noundef signext i8 @_Z27__spirv_GroupNonUniformIAddiia
// CHECK: call noundef signext i8 @_Z27__spirv_GroupNonUniformIAddiiaj
// CHECK: call noundef signext i8 @_Z27__spirv_GroupNonUniformIMuliia
// CHECK: call noundef signext i8 @_Z27__spirv_GroupNonUniformIMuliiaj
// CHECK: call noundef signext i8 @_Z33__spirv_GroupNonUniformBitwiseAndiia
// CHECK: call noundef signext i8 @_Z33__spirv_GroupNonUniformBitwiseAndiiaj
// CHECK: call noundef signext i8 @_Z32__spirv_GroupNonUniformBitwiseOriia
// CHECK: call noundef signext i8 @_Z32__spirv_GroupNonUniformBitwiseOriiaj
// CHECK: call noundef signext i8 @_Z33__spirv_GroupNonUniformBitwiseXoriia
// CHECK: call noundef signext i8 @_Z33__spirv_GroupNonUniformBitwiseXoriiaj
// CHECK: call noundef zeroext i8 @_Z27__spirv_GroupNonUniformIAddiih
// CHECK: call noundef zeroext i8 @_Z27__spirv_GroupNonUniformIAddiihj
// CHECK: call noundef zeroext i8 @_Z27__spirv_GroupNonUniformIMuliih
Expand Down Expand Up @@ -355,10 +375,14 @@ void test() {
// CHECK: call noundef i32 @_Z32__spirv_GroupNonUniformBitwiseOriijj
// CHECK: call noundef i32 @_Z33__spirv_GroupNonUniformBitwiseXoriij
// CHECK: call noundef i32 @_Z33__spirv_GroupNonUniformBitwiseXoriijj
// CHECK: call noundef i32 @_Z27__spirv_GroupNonUniformSMiniii
// CHECK: call noundef i32 @_Z27__spirv_GroupNonUniformSMiniiij
// CHECK: call noundef i32 @_Z27__spirv_GroupNonUniformSMaxiii
// CHECK: call noundef i32 @_Z27__spirv_GroupNonUniformSMaxiiij
// CHECK: call noundef signext i8 @_Z27__spirv_GroupNonUniformSMiniic
// CHECK: call noundef signext i8 @_Z27__spirv_GroupNonUniformSMiniicj
// CHECK: call noundef signext i8 @_Z27__spirv_GroupNonUniformSMaxiic
// CHECK: call noundef signext i8 @_Z27__spirv_GroupNonUniformSMaxiicj
// CHECK: call noundef signext i8 @_Z27__spirv_GroupNonUniformSMiniia
// CHECK: call noundef signext i8 @_Z27__spirv_GroupNonUniformSMiniiaj
// CHECK: call noundef signext i8 @_Z27__spirv_GroupNonUniformSMaxiia
// CHECK: call noundef signext i8 @_Z27__spirv_GroupNonUniformSMaxiiaj
// CHECK: call noundef signext i16 @_Z27__spirv_GroupNonUniformSMiniis
// CHECK: call noundef signext i16 @_Z27__spirv_GroupNonUniformSMiniisj
// CHECK: call noundef signext i16 @_Z27__spirv_GroupNonUniformSMaxiis
Expand Down
4 changes: 2 additions & 2 deletions clang/test/CodeGenSPIRV/spirv-builtin-lookup-group.cl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ bool group_any(bool predicate) {

char group_broad_cast(char a) {
// CHECK-LABEL: @group_broad_cast(
// CHECK: call spir_func i32 @_Z22__spirv_GroupBroadcastiij(
// CHECK: call spir_func signext i8 @_Z22__spirv_GroupBroadcasticj(
return __spirv_GroupBroadcast(2, a, 0u);
}

Expand Down Expand Up @@ -87,7 +87,7 @@ unsigned long group_umax(unsigned long a) {

char group_smin(char a) {
// CHECK-LABEL: @group_smin(
// CHECK: call spir_func i32 @_Z17__spirv_GroupSMiniii(
// CHECK: call spir_func signext i8 @_Z17__spirv_GroupSMiniic(
return __spirv_GroupSMin(2, 0, a);
}

Expand Down
7 changes: 0 additions & 7 deletions libclc/clc/include/clc/clc_as_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#define __CLC_CLC_AS_TYPE_H__

#define __clc_as_char(x) __builtin_astype(x, char)
#define __clc_as_schar(x) __builtin_astype(x, schar)
#define __clc_as_uchar(x) __builtin_astype(x, uchar)
#define __clc_as_short(x) __builtin_astype(x, short)
#define __clc_as_ushort(x) __builtin_astype(x, ushort)
Expand All @@ -21,7 +20,6 @@
#define __clc_as_float(x) __builtin_astype(x, float)

#define __clc_as_char2(x) __builtin_astype(x, char2)
#define __clc_as_schar2(x) __builtin_astype(x, schar2)
#define __clc_as_uchar2(x) __builtin_astype(x, uchar2)
#define __clc_as_short2(x) __builtin_astype(x, short2)
#define __clc_as_ushort2(x) __builtin_astype(x, ushort2)
Expand All @@ -32,7 +30,6 @@
#define __clc_as_float2(x) __builtin_astype(x, float2)

#define __clc_as_char3(x) __builtin_astype(x, char3)
#define __clc_as_schar3(x) __builtin_astype(x, schar3)
#define __clc_as_uchar3(x) __builtin_astype(x, uchar3)
#define __clc_as_short3(x) __builtin_astype(x, short3)
#define __clc_as_ushort3(x) __builtin_astype(x, ushort3)
Expand All @@ -43,7 +40,6 @@
#define __clc_as_float3(x) __builtin_astype(x, float3)

#define __clc_as_char4(x) __builtin_astype(x, char4)
#define __clc_as_schar4(x) __builtin_astype(x, schar4)
#define __clc_as_uchar4(x) __builtin_astype(x, uchar4)
#define __clc_as_short4(x) __builtin_astype(x, short4)
#define __clc_as_ushort4(x) __builtin_astype(x, ushort4)
Expand All @@ -54,9 +50,7 @@
#define __clc_as_float4(x) __builtin_astype(x, float4)

#define __clc_as_char8(x) __builtin_astype(x, char8)
#define __clc_as_schar8(x) __builtin_astype(x, schar8)
#define __clc_as_uchar8(x) __builtin_astype(x, uchar8)
#define __clc_as_schar8(x) __builtin_astype(x, schar8)
#define __clc_as_short8(x) __builtin_astype(x, short8)
#define __clc_as_ushort8(x) __builtin_astype(x, ushort8)
#define __clc_as_int8(x) __builtin_astype(x, int8)
Expand All @@ -66,7 +60,6 @@
#define __clc_as_float8(x) __builtin_astype(x, float8)

#define __clc_as_char16(x) __builtin_astype(x, char16)
#define __clc_as_schar16(x) __builtin_astype(x, schar16)
#define __clc_as_uchar16(x) __builtin_astype(x, uchar16)
#define __clc_as_short16(x) __builtin_astype(x, short16)
#define __clc_as_ushort16(x) __builtin_astype(x, ushort16)
Expand Down
2 changes: 0 additions & 2 deletions libclc/clc/include/clc/clc_convert.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

#define _CLC_VECTOR_CONVERT_FROM1(FROM_TYPE, SUFFIX) \
_CLC_VECTOR_CONVERT_DECL(FROM_TYPE, char, SUFFIX) \
_CLC_VECTOR_CONVERT_DECL(FROM_TYPE, schar, SUFFIX) \
_CLC_VECTOR_CONVERT_DECL(FROM_TYPE, uchar, SUFFIX) \
_CLC_VECTOR_CONVERT_DECL(FROM_TYPE, int, SUFFIX) \
_CLC_VECTOR_CONVERT_DECL(FROM_TYPE, uint, SUFFIX) \
Expand Down Expand Up @@ -58,7 +57,6 @@

#define _CLC_VECTOR_CONVERT_TO1(SUFFIX) \
_CLC_VECTOR_CONVERT_FROM(char, SUFFIX) \
_CLC_VECTOR_CONVERT_FROM(schar, SUFFIX) \
_CLC_VECTOR_CONVERT_FROM(uchar, SUFFIX) \
_CLC_VECTOR_CONVERT_FROM(int, SUFFIX) \
_CLC_VECTOR_CONVERT_FROM(uint, SUFFIX) \
Expand Down
7 changes: 0 additions & 7 deletions libclc/clc/include/clc/clctypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

/* 6.1.1 Built-in Scalar Data Types */

typedef signed char schar;
typedef unsigned char uchar;
typedef unsigned short ushort;
typedef unsigned int uint;
Expand Down Expand Up @@ -40,12 +39,6 @@ typedef __attribute__((ext_vector_type(4))) char char4;
typedef __attribute__((ext_vector_type(8))) char char8;
typedef __attribute__((ext_vector_type(16))) char char16;

typedef __attribute__((ext_vector_type(2))) schar schar2;
typedef __attribute__((ext_vector_type(3))) schar schar3;
typedef __attribute__((ext_vector_type(4))) schar schar4;
typedef __attribute__((ext_vector_type(8))) schar schar8;
typedef __attribute__((ext_vector_type(16))) schar schar16;

typedef __attribute__((ext_vector_type(2))) uchar uchar2;
typedef __attribute__((ext_vector_type(3))) uchar uchar3;
typedef __attribute__((ext_vector_type(4))) uchar uchar4;
Expand Down
Loading