From a969b474c844441344c9f0a1a0bb9dfb729bdce4 Mon Sep 17 00:00:00 2001 From: tangjj11 Date: Fri, 21 Oct 2022 14:20:59 +0800 Subject: [PATCH] [SYCLomatic] Refine vector types migration (#305) uchar1 => uint8_t ushort1 => uint16_t uint1 => uint32_t ulong1=> uint64_t ulonglong1 => uint64_t longlong1 => int64_t Similar to make_xx1 functions. Signed-off-by: Tang, Jiajun jiajun.tang@intel.com --- clang/lib/DPCT/APINamesMath.inc | 12 +- clang/lib/DPCT/MapNames.cpp | 12 +- clang/test/dpct/datatypes_test.cu | 396 ++++++++++++++--------------- clang/test/dpct/vector_type.cu | 264 +++++++++---------- clang/test/dpct/vector_type_cub.cu | 24 +- 5 files changed, 354 insertions(+), 354 deletions(-) diff --git a/clang/lib/DPCT/APINamesMath.inc b/clang/lib/DPCT/APINamesMath.inc index 233b6c99cf1c..f1f1921aa794 100644 --- a/clang/lib/DPCT/APINamesMath.inc +++ b/clang/lib/DPCT/APINamesMath.inc @@ -606,7 +606,7 @@ ENTRY_RENAMED("make_char1", "char") ENTRY_RENAMED("make_char2", MapNames::getClNamespace(false, false) + "char2") ENTRY_RENAMED("make_char3", MapNames::getClNamespace(false, false) + "char3") ENTRY_RENAMED("make_char4", MapNames::getClNamespace(false, false) + "char4") -ENTRY_RENAMED("make_uchar1", "unsigned char") +ENTRY_RENAMED("make_uchar1", "uint8_t") ENTRY_RENAMED("make_uchar2", MapNames::getClNamespace(false, false) + "uchar2") ENTRY_RENAMED("make_uchar3", MapNames::getClNamespace(false, false) + "uchar3") ENTRY_RENAMED("make_uchar4", MapNames::getClNamespace(false, false) + "uchar4") @@ -615,7 +615,7 @@ ENTRY_RENAMED("make_short1", "short") ENTRY_RENAMED("make_short2", MapNames::getClNamespace(false, false) + "short2") ENTRY_RENAMED("make_short3", MapNames::getClNamespace(false, false) + "short3") ENTRY_RENAMED("make_short4", MapNames::getClNamespace(false, false) + "short4") -ENTRY_RENAMED("make_ushort1", "unsigned short") +ENTRY_RENAMED("make_ushort1", "uint16_t") ENTRY_RENAMED("make_ushort2", MapNames::getClNamespace(false, false) + "ushort2") ENTRY_RENAMED("make_ushort3", MapNames::getClNamespace(false, false) + "ushort3") ENTRY_RENAMED("make_ushort4", MapNames::getClNamespace(false, false) + "ushort4") @@ -624,7 +624,7 @@ ENTRY_RENAMED("make_int1", "int") ENTRY_RENAMED("make_int2", MapNames::getClNamespace(false, false) + "int2") ENTRY_RENAMED("make_int3", MapNames::getClNamespace(false, false) + "int3") ENTRY_RENAMED("make_int4", MapNames::getClNamespace(false, false) + "int4") -ENTRY_RENAMED("make_uint1", "unsigned int") +ENTRY_RENAMED("make_uint1", "uint32_t") ENTRY_RENAMED("make_uint2", MapNames::getClNamespace(false, false) + "uint2") ENTRY_RENAMED("make_uint3", MapNames::getClNamespace(false, false) + "uint3") ENTRY_RENAMED("make_uint4", MapNames::getClNamespace(false, false) + "uint4") @@ -633,16 +633,16 @@ ENTRY_RENAMED("make_long1", "long") ENTRY_RENAMED("make_long2", MapNames::getClNamespace(false, false) + "long2") ENTRY_RENAMED("make_long3", MapNames::getClNamespace(false, false) + "long3") ENTRY_RENAMED("make_long4", MapNames::getClNamespace(false, false) + "long4") -ENTRY_RENAMED("make_ulong1", "unsigned long") +ENTRY_RENAMED("make_ulong1", "uint64_t") ENTRY_RENAMED("make_ulong2", MapNames::getClNamespace(false, false) + "ulong2") ENTRY_RENAMED("make_ulong3", MapNames::getClNamespace(false, false) + "ulong3") ENTRY_RENAMED("make_ulong4", MapNames::getClNamespace(false, false) + "ulong4") -ENTRY_RENAMED("make_longlong1", "long long") +ENTRY_RENAMED("make_longlong1", "int64_t") ENTRY_RENAMED("make_longlong2", MapNames::getClNamespace(false, false) + "longlong2") ENTRY_RENAMED("make_longlong3", MapNames::getClNamespace(false, false) + "longlong3") ENTRY_RENAMED("make_longlong4", MapNames::getClNamespace(false, false) + "longlong4") -ENTRY_RENAMED("make_ulonglong1", "unsigned long long") +ENTRY_RENAMED("make_ulonglong1", "uint64_t") ENTRY_RENAMED("make_ulonglong2", MapNames::getClNamespace(false, false) + "ulonglong2") ENTRY_RENAMED("make_ulonglong3", MapNames::getClNamespace(false, false) + "ulonglong3") ENTRY_RENAMED("make_ulonglong4", MapNames::getClNamespace(false, false) + "ulonglong4") diff --git a/clang/lib/DPCT/MapNames.cpp b/clang/lib/DPCT/MapNames.cpp index 9bd63bd1d83b..e339b96a3989 100644 --- a/clang/lib/DPCT/MapNames.cpp +++ b/clang/lib/DPCT/MapNames.cpp @@ -147,7 +147,7 @@ void MapNames::setExplicitNamespaceMap() { {"long2", std::make_shared(getClNamespace() + "long2")}, {"long3", std::make_shared(getClNamespace() + "long3")}, {"long4", std::make_shared(getClNamespace() + "long4")}, - {"longlong1", std::make_shared("long long")}, + {"longlong1", std::make_shared("int64_t")}, {"longlong2", std::make_shared(getClNamespace() + "longlong2")}, {"longlong3", @@ -158,26 +158,26 @@ void MapNames::setExplicitNamespaceMap() { {"short2", std::make_shared(getClNamespace() + "short2")}, {"short3", std::make_shared(getClNamespace() + "short3")}, {"short4", std::make_shared(getClNamespace() + "short4")}, - {"uchar1", std::make_shared("unsigned char")}, + {"uchar1", std::make_shared("uint8_t")}, {"uchar2", std::make_shared(getClNamespace() + "uchar2")}, {"uchar3", std::make_shared(getClNamespace() + "uchar3")}, {"uchar4", std::make_shared(getClNamespace() + "uchar4")}, - {"uint1", std::make_shared("unsigned int")}, + {"uint1", std::make_shared("uint32_t")}, {"uint2", std::make_shared(getClNamespace() + "uint2")}, {"uint3", std::make_shared(getClNamespace() + "uint3")}, {"uint4", std::make_shared(getClNamespace() + "uint4")}, - {"ulong1", std::make_shared("unsigned long")}, + {"ulong1", std::make_shared("uint64_t")}, {"ulong2", std::make_shared(getClNamespace() + "ulong2")}, {"ulong3", std::make_shared(getClNamespace() + "ulong3")}, {"ulong4", std::make_shared(getClNamespace() + "ulong4")}, - {"ulonglong1", std::make_shared("unsigned long long")}, + {"ulonglong1", std::make_shared("uint64_t")}, {"ulonglong2", std::make_shared(getClNamespace() + "ulonglong2")}, {"ulonglong3", std::make_shared(getClNamespace() + "ulonglong3")}, {"ulonglong4", std::make_shared(getClNamespace() + "ulonglong4")}, - {"ushort1", std::make_shared("unsigned short")}, + {"ushort1", std::make_shared("uint16_t")}, {"ushort2", std::make_shared(getClNamespace() + "ushort2")}, {"ushort3", std::make_shared(getClNamespace() + "ushort3")}, {"ushort4", std::make_shared(getClNamespace() + "ushort4")}, diff --git a/clang/test/dpct/datatypes_test.cu b/clang/test/dpct/datatypes_test.cu index 8f8a805da813..94c363a3380e 100644 --- a/clang/test/dpct/datatypes_test.cu +++ b/clang/test/dpct/datatypes_test.cu @@ -24,10 +24,10 @@ char1 &&var4 = std::move(var1); } { -// CHECK: unsigned char var1; -// CHECK-NEXT: unsigned char *var2; -// CHECK-NEXT: unsigned char &var3 = var1; -// CHECK-NEXT: unsigned char &&var4 = std::move(var1); +// CHECK: uint8_t var1; +// CHECK-NEXT: uint8_t *var2; +// CHECK-NEXT: uint8_t &var3 = var1; +// CHECK-NEXT: uint8_t &&var4 = std::move(var1); uchar1 var1; uchar1 *var2; uchar1 &var3 = var1; @@ -112,10 +112,10 @@ short1 &&var4 = std::move(var1); } { -// CHECK: unsigned short var1; -// CHECK-NEXT: unsigned short *var2; -// CHECK-NEXT: unsigned short &var3 = var1; -// CHECK-NEXT: unsigned short &&var4 = std::move(var1); +// CHECK: uint16_t var1; +// CHECK-NEXT: uint16_t *var2; +// CHECK-NEXT: uint16_t &var3 = var1; +// CHECK-NEXT: uint16_t &&var4 = std::move(var1); ushort1 var1; ushort1 *var2; ushort1 &var3 = var1; @@ -200,10 +200,10 @@ int1 &&var4 = std::move(var1); } { -// CHECK: unsigned int var1; -// CHECK-NEXT: unsigned int *var2; -// CHECK-NEXT: unsigned int &var3 = var1; -// CHECK-NEXT: unsigned int &&var4 = std::move(var1); +// CHECK: uint32_t var1; +// CHECK-NEXT: uint32_t *var2; +// CHECK-NEXT: uint32_t &var3 = var1; +// CHECK-NEXT: uint32_t &&var4 = std::move(var1); uint1 var1; uint1 *var2; uint1 &var3 = var1; @@ -288,10 +288,10 @@ long1 &&var4 = std::move(var1); } { -// CHECK: unsigned long var1; -// CHECK-NEXT: unsigned long *var2; -// CHECK-NEXT: unsigned long &var3 = var1; -// CHECK-NEXT: unsigned long &&var4 = std::move(var1); +// CHECK: uint64_t var1; +// CHECK-NEXT: uint64_t *var2; +// CHECK-NEXT: uint64_t &var3 = var1; +// CHECK-NEXT: uint64_t &&var4 = std::move(var1); ulong1 var1; ulong1 *var2; ulong1 &var3 = var1; @@ -409,10 +409,10 @@ float4 &&var4 = std::move(var1); } { -// CHECK: long long var1; -// CHECK-NEXT: long long *var2; -// CHECK-NEXT: long long &var3 = var1; -// CHECK-NEXT: long long &&var4 = std::move(var1); +// CHECK: int64_t var1; +// CHECK-NEXT: int64_t *var2; +// CHECK-NEXT: int64_t &var3 = var1; +// CHECK-NEXT: int64_t &&var4 = std::move(var1); longlong1 var1; longlong1 *var2; longlong1 &var3 = var1; @@ -420,10 +420,10 @@ longlong1 &&var4 = std::move(var1); } { -// CHECK: unsigned long long var1; -// CHECK-NEXT: unsigned long long *var2; -// CHECK-NEXT: unsigned long long &var3 = var1; -// CHECK-NEXT: unsigned long long &&var4 = std::move(var1); +// CHECK: uint64_t var1; +// CHECK-NEXT: uint64_t *var2; +// CHECK-NEXT: uint64_t &var3 = var1; +// CHECK-NEXT: uint64_t &&var4 = std::move(var1); ulonglong1 var1; ulonglong1 *var2; ulonglong1 &var3 = var1; @@ -550,8 +550,8 @@ void case_2(void) { } { -// CHECK: new unsigned char(); -// CHECK-NEXT: new unsigned char *(); +// CHECK: new uint8_t(); +// CHECK-NEXT: new uint8_t *(); new uchar1(); new uchar1 *(); } @@ -606,8 +606,8 @@ void case_2(void) { } { -// CHECK: new unsigned short(); -// CHECK-NEXT: new unsigned short *(); +// CHECK: new uint16_t(); +// CHECK-NEXT: new uint16_t *(); new ushort1(); new ushort1 *(); } @@ -662,8 +662,8 @@ void case_2(void) { } { -// CHECK: new unsigned int(); -// CHECK-NEXT: new unsigned int *(); +// CHECK: new uint32_t(); +// CHECK-NEXT: new uint32_t *(); new uint1(); new uint1 *(); } @@ -718,8 +718,8 @@ void case_2(void) { } { -// CHECK: new unsigned long(); -// CHECK-NEXT: new unsigned long *(); +// CHECK: new uint64_t(); +// CHECK-NEXT: new uint64_t *(); new ulong1(); new ulong1 *(); } @@ -795,15 +795,15 @@ void case_2(void) { } { -// CHECK: new long long(); -// CHECK-NEXT: new long long *(); +// CHECK: new int64_t(); +// CHECK-NEXT: new int64_t *(); new longlong1(); new longlong1 *(); } { -// CHECK: new unsigned long long(); -// CHECK-NEXT: new unsigned long long *(); +// CHECK: new uint64_t(); +// CHECK-NEXT: new uint64_t *(); new ulonglong1(); new ulonglong1 *(); } @@ -888,9 +888,9 @@ char1 foo0(); char1 *foo1(); char1 &foo2(); -// CHECK: unsigned char foo3(); -// CHECK-NEXT: unsigned char *foo4(); -// CHECK-NEXT: unsigned char &foo5(); +// CHECK: uint8_t foo3(); +// CHECK-NEXT: uint8_t *foo4(); +// CHECK-NEXT: uint8_t &foo5(); uchar1 foo3(); uchar1 *foo4(); uchar1 &foo5(); @@ -944,9 +944,9 @@ short1 foo24(); short1 *foo25(); short1 &foo26(); -// CHECK: unsigned short foo27(); -// CHECK-NEXT: unsigned short *foo28(); -// CHECK-NEXT: unsigned short &foo29(); +// CHECK: uint16_t foo27(); +// CHECK-NEXT: uint16_t *foo28(); +// CHECK-NEXT: uint16_t &foo29(); ushort1 foo27(); ushort1 *foo28(); ushort1 &foo29(); @@ -1000,9 +1000,9 @@ int1 foo48(); int1 *foo49(); int1 &foo50(); -// CHECK: unsigned int foo51(); -// CHECK-NEXT: unsigned int *foo52(); -// CHECK-NEXT: unsigned int &foo53(); +// CHECK: uint32_t foo51(); +// CHECK-NEXT: uint32_t *foo52(); +// CHECK-NEXT: uint32_t &foo53(); uint1 foo51(); uint1 *foo52(); uint1 &foo53(); @@ -1056,9 +1056,9 @@ long1 foo72(); long1 *foo73(); long1 &foo74(); -// CHECK: unsigned long foo75(); -// CHECK-NEXT: unsigned long *foo76(); -// CHECK-NEXT: unsigned long &foo77(); +// CHECK: uint64_t foo75(); +// CHECK-NEXT: uint64_t *foo76(); +// CHECK-NEXT: uint64_t &foo77(); ulong1 foo75(); ulong1 *foo76(); ulong1 &foo77(); @@ -1133,16 +1133,16 @@ float4 foo105(); float4 *foo106(); float4 &foo107(); -// CHECK: long long foo108(); -// CHECK-NEXT: long long *foo109(); -// CHECK-NEXT: long long &foo110(); +// CHECK: int64_t foo108(); +// CHECK-NEXT: int64_t *foo109(); +// CHECK-NEXT: int64_t &foo110(); longlong1 foo108(); longlong1 *foo109(); longlong1 &foo110(); -// CHECK: unsigned long long foo111(); -// CHECK-NEXT: unsigned long long *foo112(); -// CHECK-NEXT: unsigned long long &foo113(); +// CHECK: uint64_t foo111(); +// CHECK-NEXT: uint64_t *foo112(); +// CHECK-NEXT: uint64_t &foo113(); ulonglong1 foo111(); ulonglong1 *foo112(); ulonglong1 &foo113(); @@ -1229,10 +1229,10 @@ template <> struct S {}; template <> struct S {}; template <> struct S {}; -// CHECK: template <> struct S {}; -// CHECK-NEXT: template <> struct S {}; -// CHECK-NEXT: template <> struct S {}; -// CHECK-NEXT: template <> struct S {}; +// CHECK: template <> struct S {}; +// CHECK-NEXT: template <> struct S {}; +// CHECK-NEXT: template <> struct S {}; +// CHECK-NEXT: template <> struct S {}; template <> struct S {}; template <> struct S {}; template <> struct S {}; @@ -1301,10 +1301,10 @@ template <> struct S {}; template <> struct S {}; template <> struct S {}; -// CHECK: template <> struct S {}; -// CHECK-NEXT: template <> struct S {}; -// CHECK-NEXT: template <> struct S {}; -// CHECK-NEXT: template <> struct S {}; +// CHECK: template <> struct S {}; +// CHECK-NEXT: template <> struct S {}; +// CHECK-NEXT: template <> struct S {}; +// CHECK-NEXT: template <> struct S {}; template <> struct S {}; template <> struct S {}; template <> struct S {}; @@ -1373,10 +1373,10 @@ template <> struct S {}; template <> struct S {}; template <> struct S {}; -// CHECK: template <> struct S {}; -// CHECK-NEXT: template <> struct S {}; -// CHECK-NEXT: template <> struct S {}; -// CHECK-NEXT: template <> struct S {}; +// CHECK: template <> struct S {}; +// CHECK-NEXT: template <> struct S {}; +// CHECK-NEXT: template <> struct S {}; +// CHECK-NEXT: template <> struct S {}; template <> struct S {}; template <> struct S {}; template <> struct S {}; @@ -1445,10 +1445,10 @@ template <> struct S {}; template <> struct S {}; template <> struct S {}; -// CHECK: template <> struct S {}; -// CHECK-NEXT: template <> struct S {}; -// CHECK-NEXT: template <> struct S {}; -// CHECK-NEXT: template <> struct S {}; +// CHECK: template <> struct S {}; +// CHECK-NEXT: template <> struct S {}; +// CHECK-NEXT: template <> struct S {}; +// CHECK-NEXT: template <> struct S {}; template <> struct S {}; template <> struct S {}; template <> struct S {}; @@ -1544,19 +1544,19 @@ template <> struct S {}; template <> struct S {}; template <> struct S {}; -// CHECK: template <> struct S {}; -// CHECK-NEXT: template <> struct S {}; -// CHECK-NEXT: template <> struct S {}; -// CHECK-NEXT: template <> struct S {}; +// CHECK: template <> struct S {}; +// CHECK-NEXT: template <> struct S {}; +// CHECK-NEXT: template <> struct S {}; +// CHECK-NEXT: template <> struct S {}; template <> struct S {}; template <> struct S {}; template <> struct S {}; template <> struct S {}; -// CHECK: template <> struct S {}; -// CHECK-NEXT: template <> struct S {}; -// CHECK-NEXT: template <> struct S {}; -// CHECK-NEXT: template <> struct S {}; +// CHECK: template <> struct S {}; +// CHECK-NEXT: template <> struct S {}; +// CHECK-NEXT: template <> struct S {}; +// CHECK-NEXT: template <> struct S {}; template <> struct S {}; template <> struct S {}; template <> struct S {}; @@ -1666,10 +1666,10 @@ template_foo(); template_foo(); template_foo(); -// CHECK: template_foo(); -// CHECK-NEXT: template_foo(); -// CHECK-NEXT: template_foo(); -// CHECK-NEXT: template_foo(); +// CHECK: template_foo(); +// CHECK-NEXT: template_foo(); +// CHECK-NEXT: template_foo(); +// CHECK-NEXT: template_foo(); template_foo(); template_foo(); template_foo(); @@ -1738,10 +1738,10 @@ template_foo(); template_foo(); template_foo(); -// CHECK: template_foo(); -// CHECK-NEXT: template_foo(); -// CHECK-NEXT: template_foo(); -// CHECK-NEXT: template_foo(); +// CHECK: template_foo(); +// CHECK-NEXT: template_foo(); +// CHECK-NEXT: template_foo(); +// CHECK-NEXT: template_foo(); template_foo(); template_foo(); template_foo(); @@ -1810,10 +1810,10 @@ template_foo(); template_foo(); template_foo(); -// CHECK: template_foo(); -// CHECK-NEXT: template_foo(); -// CHECK-NEXT: template_foo(); -// CHECK-NEXT: template_foo(); +// CHECK: template_foo(); +// CHECK-NEXT: template_foo(); +// CHECK-NEXT: template_foo(); +// CHECK-NEXT: template_foo(); template_foo(); template_foo(); template_foo(); @@ -1882,10 +1882,10 @@ template_foo(); template_foo(); template_foo(); -// CHECK: template_foo(); -// CHECK-NEXT: template_foo(); -// CHECK-NEXT: template_foo(); -// CHECK-NEXT: template_foo(); +// CHECK: template_foo(); +// CHECK-NEXT: template_foo(); +// CHECK-NEXT: template_foo(); +// CHECK-NEXT: template_foo(); template_foo(); template_foo(); template_foo(); @@ -1981,19 +1981,19 @@ template_foo(); template_foo(); template_foo(); -// CHECK: template_foo(); -// CHECK-NEXT: template_foo(); -// CHECK-NEXT: template_foo(); -// CHECK-NEXT: template_foo(); +// CHECK: template_foo(); +// CHECK-NEXT: template_foo(); +// CHECK-NEXT: template_foo(); +// CHECK-NEXT: template_foo(); template_foo(); template_foo(); template_foo(); template_foo(); -// CHECK: template_foo(); -// CHECK-NEXT: template_foo(); -// CHECK-NEXT: template_foo(); -// CHECK-NEXT: template_foo(); +// CHECK: template_foo(); +// CHECK-NEXT: template_foo(); +// CHECK-NEXT: template_foo(); +// CHECK-NEXT: template_foo(); template_foo(); template_foo(); template_foo(); @@ -2102,10 +2102,10 @@ using UT1 = char1 *; using UT2 = char1 &; using UT3 = char1 &&; -// CHECK: using UT4 = unsigned char; -// CHECK-NEXT: using UT5 = unsigned char *; -// CHECK-NEXT: using UT6 = unsigned char &; -// CHECK-NEXT: using UT7 = unsigned char &&; +// CHECK: using UT4 = uint8_t; +// CHECK-NEXT: using UT5 = uint8_t *; +// CHECK-NEXT: using UT6 = uint8_t &; +// CHECK-NEXT: using UT7 = uint8_t &&; using UT4 = uchar1; using UT5 = uchar1 *; using UT6 = uchar1 &; @@ -2174,10 +2174,10 @@ using UT33 = short1 *; using UT34 = short1 &; using UT35 = short1 &&; -// CHECK: using UT36 = unsigned short; -// CHECK-NEXT: using UT37 = unsigned short *; -// CHECK-NEXT: using UT38 = unsigned short &; -// CHECK-NEXT: using UT39 = unsigned short &&; +// CHECK: using UT36 = uint16_t; +// CHECK-NEXT: using UT37 = uint16_t *; +// CHECK-NEXT: using UT38 = uint16_t &; +// CHECK-NEXT: using UT39 = uint16_t &&; using UT36 = ushort1; using UT37 = ushort1 *; using UT38 = ushort1 &; @@ -2246,10 +2246,10 @@ using UT65 = int1 *; using UT66 = int1 &; using UT67 = int1 &&; -// CHECK: using UT68 = unsigned int; -// CHECK-NEXT: using UT69 = unsigned int *; -// CHECK-NEXT: using UT70 = unsigned int &; -// CHECK-NEXT: using UT71 = unsigned int &&; +// CHECK: using UT68 = uint32_t; +// CHECK-NEXT: using UT69 = uint32_t *; +// CHECK-NEXT: using UT70 = uint32_t &; +// CHECK-NEXT: using UT71 = uint32_t &&; using UT68 = uint1; using UT69 = uint1 *; using UT70 = uint1 &; @@ -2318,10 +2318,10 @@ using UT97 = long1 *; using UT98 = long1 &; using UT99 = long1 &&; -// CHECK: using UT100 = unsigned long; -// CHECK-NEXT: using UT101 = unsigned long *; -// CHECK-NEXT: using UT102 = unsigned long &; -// CHECK-NEXT: using UT103 = unsigned long &&; +// CHECK: using UT100 = uint64_t; +// CHECK-NEXT: using UT101 = uint64_t *; +// CHECK-NEXT: using UT102 = uint64_t &; +// CHECK-NEXT: using UT103 = uint64_t &&; using UT100 = ulong1; using UT101 = ulong1 *; using UT102 = ulong1 &; @@ -2417,19 +2417,19 @@ using UT141 = float4 *; using UT142 = float4 &; using UT143 = float4 &&; -// CHECK: using UT144 = long long; -// CHECK-NEXT: using UT145 = long long *; -// CHECK-NEXT: using UT146 = long long &; -// CHECK-NEXT: using UT147 = long long &&; +// CHECK: using UT144 = int64_t; +// CHECK-NEXT: using UT145 = int64_t *; +// CHECK-NEXT: using UT146 = int64_t &; +// CHECK-NEXT: using UT147 = int64_t &&; using UT144 = longlong1; using UT145 = longlong1 *; using UT146 = longlong1 &; using UT147 = longlong1 &&; -// CHECK: using UT148 = unsigned long long; -// CHECK-NEXT: using UT149 = unsigned long long *; -// CHECK-NEXT: using UT150 = unsigned long long &; -// CHECK-NEXT: using UT151 = unsigned long long &&; +// CHECK: using UT148 = uint64_t; +// CHECK-NEXT: using UT149 = uint64_t *; +// CHECK-NEXT: using UT150 = uint64_t &; +// CHECK-NEXT: using UT151 = uint64_t &&; using UT148 = ulonglong1; using UT149 = ulonglong1 *; using UT150 = ulonglong1 &; @@ -2537,10 +2537,10 @@ typedef char1* T1; typedef char1& T2; typedef char1&& T3; -// CHECK: typedef unsigned char T4; -// CHECK-NEXT: typedef unsigned char* T5; -// CHECK-NEXT: typedef unsigned char& T6; -// CHECK-NEXT: typedef unsigned char&& T7; +// CHECK: typedef uint8_t T4; +// CHECK-NEXT: typedef uint8_t* T5; +// CHECK-NEXT: typedef uint8_t& T6; +// CHECK-NEXT: typedef uint8_t&& T7; typedef uchar1 T4; typedef uchar1* T5; typedef uchar1& T6; @@ -2609,10 +2609,10 @@ typedef short1* T33; typedef short1& T34; typedef short1&& T35; -// CHECK: typedef unsigned short T36; -// CHECK-NEXT: typedef unsigned short* T37; -// CHECK-NEXT: typedef unsigned short& T38; -// CHECK-NEXT: typedef unsigned short&& T39; +// CHECK: typedef uint16_t T36; +// CHECK-NEXT: typedef uint16_t* T37; +// CHECK-NEXT: typedef uint16_t& T38; +// CHECK-NEXT: typedef uint16_t&& T39; typedef ushort1 T36; typedef ushort1* T37; typedef ushort1& T38; @@ -2681,10 +2681,10 @@ typedef int1* T65; typedef int1& T66; typedef int1&& T67; -// CHECK: typedef unsigned int T68; -// CHECK-NEXT: typedef unsigned int* T69; -// CHECK-NEXT: typedef unsigned int& T70; -// CHECK-NEXT: typedef unsigned int&& T71; +// CHECK: typedef uint32_t T68; +// CHECK-NEXT: typedef uint32_t* T69; +// CHECK-NEXT: typedef uint32_t& T70; +// CHECK-NEXT: typedef uint32_t&& T71; typedef uint1 T68; typedef uint1* T69; typedef uint1& T70; @@ -2753,10 +2753,10 @@ typedef long1* T97; typedef long1& T98; typedef long1&& T99; -// CHECK: typedef unsigned long T100; -// CHECK-NEXT: typedef unsigned long* T101; -// CHECK-NEXT: typedef unsigned long& T102; -// CHECK-NEXT: typedef unsigned long&& T103; +// CHECK: typedef uint64_t T100; +// CHECK-NEXT: typedef uint64_t* T101; +// CHECK-NEXT: typedef uint64_t& T102; +// CHECK-NEXT: typedef uint64_t&& T103; typedef ulong1 T100; typedef ulong1* T101; typedef ulong1& T102; @@ -2852,19 +2852,19 @@ typedef float4* T141; typedef float4& T142; typedef float4&& T143; -// CHECK: typedef long long T144; -// CHECK-NEXT: typedef long long* T145; -// CHECK-NEXT: typedef long long& T146; -// CHECK-NEXT: typedef long long&& T147; +// CHECK: typedef int64_t T144; +// CHECK-NEXT: typedef int64_t* T145; +// CHECK-NEXT: typedef int64_t& T146; +// CHECK-NEXT: typedef int64_t&& T147; typedef longlong1 T144; typedef longlong1* T145; typedef longlong1& T146; typedef longlong1&& T147; -// CHECK: typedef unsigned long long T148; -// CHECK-NEXT: typedef unsigned long long* T149; -// CHECK-NEXT: typedef unsigned long long& T150; -// CHECK-NEXT: typedef unsigned long long&& T151; +// CHECK: typedef uint64_t T148; +// CHECK-NEXT: typedef uint64_t* T149; +// CHECK-NEXT: typedef uint64_t& T150; +// CHECK-NEXT: typedef uint64_t&& T151; typedef ulonglong1 T148; typedef ulonglong1* T149; typedef ulonglong1& T150; @@ -2986,10 +2986,10 @@ __device__ void foo_t(){ } { -// CHECK: #define T8_4 unsigned char -// CHECK-NEXT: #define T8_5 unsigned char * -// CHECK-NEXT: #define T8_6 unsigned char & -// CHECK-NEXT: #define T8_7 unsigned char && +// CHECK: #define T8_4 uint8_t +// CHECK-NEXT: #define T8_5 uint8_t * +// CHECK-NEXT: #define T8_6 uint8_t & +// CHECK-NEXT: #define T8_7 uint8_t && // CHECK-NEXT: T8_4 a1; // CHECK-NEXT: T8_5 a2; // CHECK-NEXT: T8_6 a3=a1; @@ -3146,10 +3146,10 @@ __device__ void foo_t(){ } { -// CHECK: #define T8_36 unsigned short -// CHECK-NEXT: #define T8_37 unsigned short * -// CHECK-NEXT: #define T8_38 unsigned short & -// CHECK-NEXT: #define T8_39 unsigned short && +// CHECK: #define T8_36 uint16_t +// CHECK-NEXT: #define T8_37 uint16_t * +// CHECK-NEXT: #define T8_38 uint16_t & +// CHECK-NEXT: #define T8_39 uint16_t && // CHECK-NEXT: T8_36 a1; // CHECK-NEXT: T8_37 a2; // CHECK-NEXT: T8_38 a3=a1; @@ -3306,10 +3306,10 @@ __device__ void foo_t(){ } { -// CHECK: #define T8_68 unsigned int -// CHECK-NEXT: #define T8_69 unsigned int * -// CHECK-NEXT: #define T8_70 unsigned int & -// CHECK-NEXT: #define T8_71 unsigned int && +// CHECK: #define T8_68 uint32_t +// CHECK-NEXT: #define T8_69 uint32_t * +// CHECK-NEXT: #define T8_70 uint32_t & +// CHECK-NEXT: #define T8_71 uint32_t && // CHECK-NEXT: T8_68 a1; // CHECK-NEXT: T8_69 a2; // CHECK-NEXT: T8_70 a3=a1; @@ -3466,10 +3466,10 @@ __device__ void foo_t(){ } { -// CHECK: #define T8_100 unsigned long -// CHECK-NEXT: #define T8_101 unsigned long * -// CHECK-NEXT: #define T8_102 unsigned long & -// CHECK-NEXT: #define T8_103 unsigned long && +// CHECK: #define T8_100 uint64_t +// CHECK-NEXT: #define T8_101 uint64_t * +// CHECK-NEXT: #define T8_102 uint64_t & +// CHECK-NEXT: #define T8_103 uint64_t && // CHECK-NEXT: T8_100 a1; // CHECK-NEXT: T8_101 a2; // CHECK-NEXT: T8_102 a3=a1; @@ -3686,10 +3686,10 @@ __device__ void foo_t(){ } { -// CHECK: #define T8_144 long long -// CHECK-NEXT: #define T8_145 long long * -// CHECK-NEXT: #define T8_146 long long & -// CHECK-NEXT: #define T8_147 long long && +// CHECK: #define T8_144 int64_t +// CHECK-NEXT: #define T8_145 int64_t * +// CHECK-NEXT: #define T8_146 int64_t & +// CHECK-NEXT: #define T8_147 int64_t && // CHECK-NEXT: T8_144 a1; // CHECK-NEXT: T8_145 a2; // CHECK-NEXT: T8_146 a3=a1; @@ -3706,10 +3706,10 @@ __device__ void foo_t(){ } { -// CHECK: #define T8_148 unsigned long long -// CHECK-NEXT: #define T8_149 unsigned long long * -// CHECK-NEXT: #define T8_150 unsigned long long & -// CHECK-NEXT: #define T8_151 unsigned long long && +// CHECK: #define T8_148 uint64_t +// CHECK-NEXT: #define T8_149 uint64_t * +// CHECK-NEXT: #define T8_150 uint64_t & +// CHECK-NEXT: #define T8_151 uint64_t && // CHECK-NEXT: T8_148 a1; // CHECK-NEXT: T8_149 a2; // CHECK-NEXT: T8_150 a3=a1; @@ -3943,10 +3943,10 @@ template <> void foo2(char1){} template <> void foo3(char1){} template <> void foo4(char1){} -// CHECK: template <> void foo1(unsigned char){} -// CHECK-NEXT: template <> void foo2(unsigned char){} -// CHECK-NEXT: template <> void foo3(unsigned char){} -// CHECK-NEXT: template <> void foo4(unsigned char){} +// CHECK: template <> void foo1(uint8_t){} +// CHECK-NEXT: template <> void foo2(uint8_t){} +// CHECK-NEXT: template <> void foo3(uint8_t){} +// CHECK-NEXT: template <> void foo4(uint8_t){} template <> void foo1(uchar1){} template <> void foo2(uchar1){} template <> void foo3(uchar1){} @@ -4015,10 +4015,10 @@ template <> void foo2(short1){} template <> void foo3(short1){} template <> void foo4(short1){} -// CHECK: template <> void foo1(unsigned short){} -// CHECK-NEXT: template <> void foo2(unsigned short){} -// CHECK-NEXT: template <> void foo3(unsigned short){} -// CHECK-NEXT: template <> void foo4(unsigned short){} +// CHECK: template <> void foo1(uint16_t){} +// CHECK-NEXT: template <> void foo2(uint16_t){} +// CHECK-NEXT: template <> void foo3(uint16_t){} +// CHECK-NEXT: template <> void foo4(uint16_t){} template <> void foo1(ushort1){} template <> void foo2(ushort1){} template <> void foo3(ushort1){} @@ -4087,10 +4087,10 @@ template <> void foo2(int1){} template <> void foo3(int1){} template <> void foo4(int1){} -// CHECK: template <> void foo1(unsigned int){} -// CHECK-NEXT: template <> void foo2(unsigned int){} -// CHECK-NEXT: template <> void foo3(unsigned int){} -// CHECK-NEXT: template <> void foo4(unsigned int){} +// CHECK: template <> void foo1(uint32_t){} +// CHECK-NEXT: template <> void foo2(uint32_t){} +// CHECK-NEXT: template <> void foo3(uint32_t){} +// CHECK-NEXT: template <> void foo4(uint32_t){} template <> void foo1(uint1){} template <> void foo2(uint1){} template <> void foo3(uint1){} @@ -4159,10 +4159,10 @@ template <> void foo2(long1){} template <> void foo3(long1){} template <> void foo4(long1){} -// CHECK: template <> void foo1(unsigned long){} -// CHECK-NEXT: template <> void foo2(unsigned long){} -// CHECK-NEXT: template <> void foo3(unsigned long){} -// CHECK-NEXT: template <> void foo4(unsigned long){} +// CHECK: template <> void foo1(uint64_t){} +// CHECK-NEXT: template <> void foo2(uint64_t){} +// CHECK-NEXT: template <> void foo3(uint64_t){} +// CHECK-NEXT: template <> void foo4(uint64_t){} template <> void foo1(ulong1){} template <> void foo2(ulong1){} template <> void foo3(ulong1){} @@ -4258,19 +4258,19 @@ template <> void foo2(float4){} template <> void foo3(float4){} template <> void foo4(float4){} -// CHECK: template <> void foo1(long long){} -// CHECK-NEXT: template <> void foo2(long long){} -// CHECK-NEXT: template <> void foo3(long long){} -// CHECK-NEXT: template <> void foo4(long long){} +// CHECK: template <> void foo1(int64_t){} +// CHECK-NEXT: template <> void foo2(int64_t){} +// CHECK-NEXT: template <> void foo3(int64_t){} +// CHECK-NEXT: template <> void foo4(int64_t){} template <> void foo1(longlong1){} template <> void foo2(longlong1){} template <> void foo3(longlong1){} template <> void foo4(longlong1){} -// CHECK: template <> void foo1(unsigned long long){} -// CHECK-NEXT: template <> void foo2(unsigned long long){} -// CHECK-NEXT: template <> void foo3(unsigned long long){} -// CHECK-NEXT: template <> void foo4(unsigned long long){} +// CHECK: template <> void foo1(uint64_t){} +// CHECK-NEXT: template <> void foo2(uint64_t){} +// CHECK-NEXT: template <> void foo3(uint64_t){} +// CHECK-NEXT: template <> void foo4(uint64_t){} template <> void foo1(ulonglong1){} template <> void foo2(ulonglong1){} template <> void foo3(ulonglong1){} diff --git a/clang/test/dpct/vector_type.cu b/clang/test/dpct/vector_type.cu index 7d8d59ddae3f..fec9be07eb5e 100644 --- a/clang/test/dpct/vector_type.cu +++ b/clang/test/dpct/vector_type.cu @@ -1445,31 +1445,31 @@ int main_long4() { return 0; } -// CHECK: void func3_longlong1(long long a, long long b, long long c) { +// CHECK: void func3_longlong1(int64_t a, int64_t b, int64_t c) { void func3_longlong1(longlong1 a, longlong1 b, longlong1 c) { } -// CHECK: void func_longlong1(long long a) { +// CHECK: void func_longlong1(int64_t a) { void func_longlong1(longlong1 a) { } -// CHECK: void kernel_longlong1(long long *a, long long *b) { +// CHECK: void kernel_longlong1(int64_t *a, int64_t *b) { __global__ void kernel_longlong1(longlong1 *a, longlong1 *b) { } int main_longlong1() { // range default constructor does the right thing. - // CHECK: long long longlong1_a; + // CHECK: int64_t longlong1_a; longlong1 longlong1_a; - // CHECK: long long longlong1_b = long long(1); + // CHECK: int64_t longlong1_b = int64_t(1); longlong1 longlong1_b = make_longlong1(1); - // CHECK: long long longlong1_c = long long(longlong1_b); + // CHECK: int64_t longlong1_c = int64_t(longlong1_b); longlong1 longlong1_c = longlong1(longlong1_b); - // CHECK: long long longlong1_d(longlong1_c); + // CHECK: int64_t longlong1_d(longlong1_c); longlong1 longlong1_d(longlong1_c); - // CHECK: func3_longlong1(longlong1_b, long long(longlong1_b), (long long)longlong1_b); + // CHECK: func3_longlong1(longlong1_b, int64_t(longlong1_b), (int64_t)longlong1_b); func3_longlong1(longlong1_b, longlong1(longlong1_b), (longlong1)longlong1_b); - // CHECK: long long *longlong1_e; + // CHECK: int64_t *longlong1_e; longlong1 *longlong1_e; - // CHECK: long long *longlong1_f; + // CHECK: int64_t *longlong1_f; longlong1 *longlong1_f; // CHECK: long long longlong1_g = longlong1_c; long long longlong1_g = longlong1_c.x; @@ -1477,21 +1477,21 @@ int main_longlong1() { longlong1_a.x = longlong1_d.x; // CHECK: if (longlong1_b == longlong1_d) {} if (longlong1_b.x == longlong1_d.x) {} - // CHECK: long long longlong1_h[16]; + // CHECK: int64_t longlong1_h[16]; longlong1 longlong1_h[16]; - // CHECK: long long longlong1_i[32]; + // CHECK: int64_t longlong1_i[32]; longlong1 longlong1_i[32]; // CHECK: if (longlong1_h[12] == longlong1_i[12]) {} if (longlong1_h[12].x == longlong1_i[12].x) {} - // CHECK: longlong1_f = (long long *)longlong1_i; + // CHECK: longlong1_f = (int64_t *)longlong1_i; longlong1_f = (longlong1 *)longlong1_i; - // CHECK: longlong1_a = (long long)longlong1_c; + // CHECK: longlong1_a = (int64_t)longlong1_c; longlong1_a = (longlong1)longlong1_c; - // CHECK: longlong1_b = long long(longlong1_b); + // CHECK: longlong1_b = int64_t(longlong1_b); longlong1_b = longlong1(longlong1_b); - // CHECK: long long longlong1_j, longlong1_k, longlong1_l, longlong1_m[16], *longlong1_n[32]; + // CHECK: int64_t longlong1_j, longlong1_k, longlong1_l, longlong1_m[16], *longlong1_n[32]; longlong1 longlong1_j, longlong1_k, longlong1_l, longlong1_m[16], *longlong1_n[32]; - // CHECK: int longlong1_o = sizeof(long long); + // CHECK: int longlong1_o = sizeof(int64_t); int longlong1_o = sizeof(longlong1); // CHECK: int long long_p = sizeof(long long); int long long_p = sizeof(long long); @@ -1500,8 +1500,8 @@ int main_longlong1() { int *longlong1_cast; // CHECK: dpct::get_default_queue().submit( // CHECK-NEXT: [&](sycl::handler &cgh) { - // CHECK-NEXT: dpct::access_wrapper longlong1_e_acc_ct0(longlong1_e, cgh); - // CHECK-NEXT: dpct::access_wrapper longlong1_cast_acc_ct1((long long *)longlong1_cast, cgh); + // CHECK-NEXT: dpct::access_wrapper longlong1_e_acc_ct0(longlong1_e, cgh); + // CHECK-NEXT: dpct::access_wrapper longlong1_cast_acc_ct1((int64_t *)longlong1_cast, cgh); // CHECK-EMPTY: // CHECK-NEXT: cgh.parallel_for>( // CHECK-NEXT: sycl::nd_range<3>(sycl::range<3>(1, 1, 1), sycl::range<3>(1, 1, 1)), @@ -1510,8 +1510,8 @@ int main_longlong1() { // CHECK-NEXT: }); // CHECK-NEXT: }); kernel_longlong1<<<1,1>>>(longlong1_e, (longlong1 *)longlong1_cast); - // CHECK: long long longlong1_r = (long long){1}; - // CHECK-NEXT: auto longlong1_s = (long long){1}; + // CHECK: int64_t longlong1_r = (int64_t){1}; + // CHECK-NEXT: auto longlong1_s = (int64_t){1}; longlong1 longlong1_r = (longlong1){1}; auto longlong1_s = (longlong1){1}; return 0; @@ -2021,31 +2021,31 @@ int main_short4() { return 0; } -// CHECK: void func3_uchar1(unsigned char a, unsigned char b, unsigned char c) { +// CHECK: void func3_uchar1(uint8_t a, uint8_t b, uint8_t c) { void func3_uchar1(uchar1 a, uchar1 b, uchar1 c) { } -// CHECK: void func_uchar1(unsigned char a) { +// CHECK: void func_uchar1(uint8_t a) { void func_uchar1(uchar1 a) { } -// CHECK: void kernel_uchar1(unsigned char *a, unsigned char *b) { +// CHECK: void kernel_uchar1(uint8_t *a, uint8_t *b) { __global__ void kernel_uchar1(uchar1 *a, uchar1 *b) { } int main_uchar1() { // range default constructor does the right thing. - // CHECK: unsigned char uchar1_a; + // CHECK: uint8_t uchar1_a; uchar1 uchar1_a; - // CHECK: unsigned char uchar1_b = unsigned char(1); + // CHECK: uint8_t uchar1_b = uint8_t(1); uchar1 uchar1_b = make_uchar1(1); - // CHECK: unsigned char uchar1_c = unsigned char(uchar1_b); + // CHECK: uint8_t uchar1_c = uint8_t(uchar1_b); uchar1 uchar1_c = uchar1(uchar1_b); - // CHECK: unsigned char uchar1_d(uchar1_c); + // CHECK: uint8_t uchar1_d(uchar1_c); uchar1 uchar1_d(uchar1_c); - // CHECK: func3_uchar1(uchar1_b, unsigned char(uchar1_b), (unsigned char)uchar1_b); + // CHECK: func3_uchar1(uchar1_b, uint8_t(uchar1_b), (uint8_t)uchar1_b); func3_uchar1(uchar1_b, uchar1(uchar1_b), (uchar1)uchar1_b); - // CHECK: unsigned char *uchar1_e; + // CHECK: uint8_t *uchar1_e; uchar1 *uchar1_e; - // CHECK: unsigned char *uchar1_f; + // CHECK: uint8_t *uchar1_f; uchar1 *uchar1_f; // CHECK: unsigned char uchar1_g = uchar1_c; unsigned char uchar1_g = uchar1_c.x; @@ -2053,21 +2053,21 @@ int main_uchar1() { uchar1_a.x = uchar1_d.x; // CHECK: if (uchar1_b == uchar1_d) {} if (uchar1_b.x == uchar1_d.x) {} - // CHECK: unsigned char uchar1_h[16]; + // CHECK: uint8_t uchar1_h[16]; uchar1 uchar1_h[16]; - // CHECK: unsigned char uchar1_i[32]; + // CHECK: uint8_t uchar1_i[32]; uchar1 uchar1_i[32]; // CHECK: if (uchar1_h[12] == uchar1_i[12]) {} if (uchar1_h[12].x == uchar1_i[12].x) {} - // CHECK: uchar1_f = (unsigned char *)uchar1_i; + // CHECK: uchar1_f = (uint8_t *)uchar1_i; uchar1_f = (uchar1 *)uchar1_i; - // CHECK: uchar1_a = (unsigned char)uchar1_c; + // CHECK: uchar1_a = (uint8_t)uchar1_c; uchar1_a = (uchar1)uchar1_c; - // CHECK: uchar1_b = unsigned char(uchar1_b); + // CHECK: uchar1_b = uint8_t(uchar1_b); uchar1_b = uchar1(uchar1_b); - // CHECK: unsigned char uchar1_j, uchar1_k, uchar1_l, uchar1_m[16], *uchar1_n[32]; + // CHECK: uint8_t uchar1_j, uchar1_k, uchar1_l, uchar1_m[16], *uchar1_n[32]; uchar1 uchar1_j, uchar1_k, uchar1_l, uchar1_m[16], *uchar1_n[32]; - // CHECK: int uchar1_o = sizeof(unsigned char); + // CHECK: int uchar1_o = sizeof(uint8_t); int uchar1_o = sizeof(uchar1); // CHECK: int unsigned char_p = sizeof(unsigned char); int unsigned char_p = sizeof(unsigned char); @@ -2076,8 +2076,8 @@ int main_uchar1() { int *uchar1_cast; // CHECK: dpct::get_default_queue().submit( // CHECK-NEXT: [&](sycl::handler &cgh) { - // CHECK-NEXT: dpct::access_wrapper uchar1_e_acc_ct0(uchar1_e, cgh); - // CHECK-NEXT: dpct::access_wrapper uchar1_cast_acc_ct1((unsigned char *)uchar1_cast, cgh); + // CHECK-NEXT: dpct::access_wrapper uchar1_e_acc_ct0(uchar1_e, cgh); + // CHECK-NEXT: dpct::access_wrapper uchar1_cast_acc_ct1((uint8_t *)uchar1_cast, cgh); // CHECK-EMPTY: // CHECK-NEXT: cgh.parallel_for>( // CHECK-NEXT: sycl::nd_range<3>(sycl::range<3>(1, 1, 1), sycl::range<3>(1, 1, 1)), @@ -2086,8 +2086,8 @@ int main_uchar1() { // CHECK-NEXT: }); // CHECK-NEXT: }); kernel_uchar1<<<1,1>>>(uchar1_e, (uchar1 *)uchar1_cast); - // CHECK: unsigned char uchar1_r = (unsigned char){1}; - // CHECK-NEXT: auto uchar1_s = (unsigned char){1}; + // CHECK: uint8_t uchar1_r = (uint8_t){1}; + // CHECK-NEXT: auto uchar1_s = (uint8_t){1}; uchar1 uchar1_r = (uchar1){1}; auto uchar1_s = (uchar1){1}; return 0; @@ -2309,31 +2309,31 @@ int main_uchar4() { return 0; } -// CHECK: void func3_uint1(unsigned int a, unsigned int b, unsigned int c) { +// CHECK: void func3_uint1(uint32_t a, uint32_t b, uint32_t c) { void func3_uint1(uint1 a, uint1 b, uint1 c) { } -// CHECK: void func_uint1(unsigned int a) { +// CHECK: void func_uint1(uint32_t a) { void func_uint1(uint1 a) { } -// CHECK: void kernel_uint1(unsigned int *a, unsigned int *b) { +// CHECK: void kernel_uint1(uint32_t *a, uint32_t *b) { __global__ void kernel_uint1(uint1 *a, uint1 *b) { } int main_uint1() { // range default constructor does the right thing. - // CHECK: unsigned int uint1_a; + // CHECK: uint32_t uint1_a; uint1 uint1_a; - // CHECK: unsigned int uint1_b = unsigned int(1); + // CHECK: uint32_t uint1_b = uint32_t(1); uint1 uint1_b = make_uint1(1); - // CHECK: unsigned int uint1_c = unsigned int(uint1_b); + // CHECK: uint32_t uint1_c = uint32_t(uint1_b); uint1 uint1_c = uint1(uint1_b); - // CHECK: unsigned int uint1_d(uint1_c); + // CHECK: uint32_t uint1_d(uint1_c); uint1 uint1_d(uint1_c); - // CHECK: func3_uint1(uint1_b, unsigned int(uint1_b), (unsigned int)uint1_b); + // CHECK: func3_uint1(uint1_b, uint32_t(uint1_b), (uint32_t)uint1_b); func3_uint1(uint1_b, uint1(uint1_b), (uint1)uint1_b); - // CHECK: unsigned int *uint1_e; + // CHECK: uint32_t *uint1_e; uint1 *uint1_e; - // CHECK: unsigned int *uint1_f; + // CHECK: uint32_t *uint1_f; uint1 *uint1_f; // CHECK: unsigned int uint1_g = uint1_c; unsigned int uint1_g = uint1_c.x; @@ -2341,21 +2341,21 @@ int main_uint1() { uint1_a.x = uint1_d.x; // CHECK: if (uint1_b == uint1_d) {} if (uint1_b.x == uint1_d.x) {} - // CHECK: unsigned int uint1_h[16]; + // CHECK: uint32_t uint1_h[16]; uint1 uint1_h[16]; - // CHECK: unsigned int uint1_i[32]; + // CHECK: uint32_t uint1_i[32]; uint1 uint1_i[32]; // CHECK: if (uint1_h[12] == uint1_i[12]) {} if (uint1_h[12].x == uint1_i[12].x) {} - // CHECK: uint1_f = (unsigned int *)uint1_i; + // CHECK: uint1_f = (uint32_t *)uint1_i; uint1_f = (uint1 *)uint1_i; - // CHECK: uint1_a = (unsigned int)uint1_c; + // CHECK: uint1_a = (uint32_t)uint1_c; uint1_a = (uint1)uint1_c; - // CHECK: uint1_b = unsigned int(uint1_b); + // CHECK: uint1_b = uint32_t(uint1_b); uint1_b = uint1(uint1_b); - // CHECK: unsigned int uint1_j, uint1_k, uint1_l, uint1_m[16], *uint1_n[32]; + // CHECK: uint32_t uint1_j, uint1_k, uint1_l, uint1_m[16], *uint1_n[32]; uint1 uint1_j, uint1_k, uint1_l, uint1_m[16], *uint1_n[32]; - // CHECK: int uint1_o = sizeof(unsigned int); + // CHECK: int uint1_o = sizeof(uint32_t); int uint1_o = sizeof(uint1); // CHECK: int unsigned int_p = sizeof(unsigned int); int unsigned int_p = sizeof(unsigned int); @@ -2364,8 +2364,8 @@ int main_uint1() { int *uint1_cast; // CHECK: dpct::get_default_queue().submit( // CHECK-NEXT: [&](sycl::handler &cgh) { - // CHECK-NEXT: dpct::access_wrapper uint1_e_acc_ct0(uint1_e, cgh); - // CHECK-NEXT: dpct::access_wrapper uint1_cast_acc_ct1((unsigned int *)uint1_cast, cgh); + // CHECK-NEXT: dpct::access_wrapper uint1_e_acc_ct0(uint1_e, cgh); + // CHECK-NEXT: dpct::access_wrapper uint1_cast_acc_ct1((uint32_t *)uint1_cast, cgh); // CHECK-EMPTY: // CHECK-NEXT: cgh.parallel_for>( // CHECK-NEXT: sycl::nd_range<3>(sycl::range<3>(1, 1, 1), sycl::range<3>(1, 1, 1)), @@ -2374,8 +2374,8 @@ int main_uint1() { // CHECK-NEXT: }); // CHECK-NEXT: }); kernel_uint1<<<1,1>>>(uint1_e, (uint1 *)uint1_cast); - // CHECK: unsigned int uint1_r = (unsigned int){1}; - // CHECK-NEXT: auto uint1_s = (unsigned int){1}; + // CHECK: uint32_t uint1_r = (uint32_t){1}; + // CHECK-NEXT: auto uint1_s = (uint32_t){1}; uint1 uint1_r = (uint1){1}; auto uint1_s = (uint1){1}; return 0; @@ -2597,31 +2597,31 @@ int main_uint4() { return 0; } -// CHECK: void func3_ulong1(unsigned long a, unsigned long b, unsigned long c) { +// CHECK: void func3_ulong1(uint64_t a, uint64_t b, uint64_t c) { void func3_ulong1(ulong1 a, ulong1 b, ulong1 c) { } -// CHECK: void func_ulong1(unsigned long a) { +// CHECK: void func_ulong1(uint64_t a) { void func_ulong1(ulong1 a) { } -// CHECK: void kernel_ulong1(unsigned long *a, unsigned long *b) { +// CHECK: void kernel_ulong1(uint64_t *a, uint64_t *b) { __global__ void kernel_ulong1(ulong1 *a, ulong1 *b) { } int main_ulong1() { // range default constructor does the right thing. - // CHECK: unsigned long ulong1_a; + // CHECK: uint64_t ulong1_a; ulong1 ulong1_a; - // CHECK: unsigned long ulong1_b = unsigned long(1); + // CHECK: uint64_t ulong1_b = uint64_t(1); ulong1 ulong1_b = make_ulong1(1); - // CHECK: unsigned long ulong1_c = unsigned long(ulong1_b); + // CHECK: uint64_t ulong1_c = uint64_t(ulong1_b); ulong1 ulong1_c = ulong1(ulong1_b); - // CHECK: unsigned long ulong1_d(ulong1_c); + // CHECK: uint64_t ulong1_d(ulong1_c); ulong1 ulong1_d(ulong1_c); - // CHECK: func3_ulong1(ulong1_b, unsigned long(ulong1_b), (unsigned long)ulong1_b); + // CHECK: func3_ulong1(ulong1_b, uint64_t(ulong1_b), (uint64_t)ulong1_b); func3_ulong1(ulong1_b, ulong1(ulong1_b), (ulong1)ulong1_b); - // CHECK: unsigned long *ulong1_e; + // CHECK: uint64_t *ulong1_e; ulong1 *ulong1_e; - // CHECK: unsigned long *ulong1_f; + // CHECK: uint64_t *ulong1_f; ulong1 *ulong1_f; // CHECK: unsigned long ulong1_g = ulong1_c; unsigned long ulong1_g = ulong1_c.x; @@ -2629,21 +2629,21 @@ int main_ulong1() { ulong1_a.x = ulong1_d.x; // CHECK: if (ulong1_b == ulong1_d) {} if (ulong1_b.x == ulong1_d.x) {} - // CHECK: unsigned long ulong1_h[16]; + // CHECK: uint64_t ulong1_h[16]; ulong1 ulong1_h[16]; - // CHECK: unsigned long ulong1_i[32]; + // CHECK: uint64_t ulong1_i[32]; ulong1 ulong1_i[32]; // CHECK: if (ulong1_h[12] == ulong1_i[12]) {} if (ulong1_h[12].x == ulong1_i[12].x) {} - // CHECK: ulong1_f = (unsigned long *)ulong1_i; + // CHECK: ulong1_f = (uint64_t *)ulong1_i; ulong1_f = (ulong1 *)ulong1_i; - // CHECK: ulong1_a = (unsigned long)ulong1_c; + // CHECK: ulong1_a = (uint64_t)ulong1_c; ulong1_a = (ulong1)ulong1_c; - // CHECK: ulong1_b = unsigned long(ulong1_b); + // CHECK: ulong1_b = uint64_t(ulong1_b); ulong1_b = ulong1(ulong1_b); - // CHECK: unsigned long ulong1_j, ulong1_k, ulong1_l, ulong1_m[16], *ulong1_n[32]; + // CHECK: uint64_t ulong1_j, ulong1_k, ulong1_l, ulong1_m[16], *ulong1_n[32]; ulong1 ulong1_j, ulong1_k, ulong1_l, ulong1_m[16], *ulong1_n[32]; - // CHECK: int ulong1_o = sizeof(unsigned long); + // CHECK: int ulong1_o = sizeof(uint64_t); int ulong1_o = sizeof(ulong1); // CHECK: int unsigned long_p = sizeof(unsigned long); int unsigned long_p = sizeof(unsigned long); @@ -2652,8 +2652,8 @@ int main_ulong1() { int *ulong1_cast; // CHECK: dpct::get_default_queue().submit( // CHECK-NEXT: [&](sycl::handler &cgh) { - // CHECK-NEXT: dpct::access_wrapper ulong1_e_acc_ct0(ulong1_e, cgh); - // CHECK-NEXT: dpct::access_wrapper ulong1_cast_acc_ct1((unsigned long *)ulong1_cast, cgh); + // CHECK-NEXT: dpct::access_wrapper ulong1_e_acc_ct0(ulong1_e, cgh); + // CHECK-NEXT: dpct::access_wrapper ulong1_cast_acc_ct1((uint64_t *)ulong1_cast, cgh); // CHECK-EMPTY: // CHECK-NEXT: cgh.parallel_for>( // CHECK-NEXT: sycl::nd_range<3>(sycl::range<3>(1, 1, 1), sycl::range<3>(1, 1, 1)), @@ -2662,8 +2662,8 @@ int main_ulong1() { // CHECK-NEXT: }); // CHECK-NEXT: }); kernel_ulong1<<<1,1>>>(ulong1_e, (ulong1 *)ulong1_cast); - // CHECK: unsigned long ulong1_r = (unsigned long){1}; - // CHECK-NEXT: auto ulong1_s = (unsigned long){1}; + // CHECK: uint64_t ulong1_r = (uint64_t){1}; + // CHECK-NEXT: auto ulong1_s = (uint64_t){1}; ulong1 ulong1_r = (ulong1){1}; auto ulong1_s = (ulong1){1}; return 0; @@ -2885,31 +2885,31 @@ int main_ulong4() { return 0; } -// CHECK: void func3_ulonglong1(unsigned long long a, unsigned long long b, unsigned long long c) { +// CHECK: void func3_ulonglong1(uint64_t a, uint64_t b, uint64_t c) { void func3_ulonglong1(ulonglong1 a, ulonglong1 b, ulonglong1 c) { } -// CHECK: void func_ulonglong1(unsigned long long a) { +// CHECK: void func_ulonglong1(uint64_t a) { void func_ulonglong1(ulonglong1 a) { } -// CHECK: void kernel_ulonglong1(unsigned long long *a, unsigned long long *b) { +// CHECK: void kernel_ulonglong1(uint64_t *a, uint64_t *b) { __global__ void kernel_ulonglong1(ulonglong1 *a, ulonglong1 *b) { } int main_ulonglong1() { // range default constructor does the right thing. - // CHECK: unsigned long long ulonglong1_a; + // CHECK: uint64_t ulonglong1_a; ulonglong1 ulonglong1_a; - // CHECK: unsigned long long ulonglong1_b = unsigned long long(1); + // CHECK: uint64_t ulonglong1_b = uint64_t(1); ulonglong1 ulonglong1_b = make_ulonglong1(1); - // CHECK: unsigned long long ulonglong1_c = unsigned long long(ulonglong1_b); + // CHECK: uint64_t ulonglong1_c = uint64_t(ulonglong1_b); ulonglong1 ulonglong1_c = ulonglong1(ulonglong1_b); - // CHECK: unsigned long long ulonglong1_d(ulonglong1_c); + // CHECK: uint64_t ulonglong1_d(ulonglong1_c); ulonglong1 ulonglong1_d(ulonglong1_c); - // CHECK: func3_ulonglong1(ulonglong1_b, unsigned long long(ulonglong1_b), (unsigned long long)ulonglong1_b); + // CHECK: func3_ulonglong1(ulonglong1_b, uint64_t(ulonglong1_b), (uint64_t)ulonglong1_b); func3_ulonglong1(ulonglong1_b, ulonglong1(ulonglong1_b), (ulonglong1)ulonglong1_b); - // CHECK: unsigned long long *ulonglong1_e; + // CHECK: uint64_t *ulonglong1_e; ulonglong1 *ulonglong1_e; - // CHECK: unsigned long long *ulonglong1_f; + // CHECK: uint64_t *ulonglong1_f; ulonglong1 *ulonglong1_f; // CHECK: unsigned long long ulonglong1_g = ulonglong1_c; unsigned long long ulonglong1_g = ulonglong1_c.x; @@ -2917,21 +2917,21 @@ int main_ulonglong1() { ulonglong1_a.x = ulonglong1_d.x; // CHECK: if (ulonglong1_b == ulonglong1_d) {} if (ulonglong1_b.x == ulonglong1_d.x) {} - // CHECK: unsigned long long ulonglong1_h[16]; + // CHECK: uint64_t ulonglong1_h[16]; ulonglong1 ulonglong1_h[16]; - // CHECK: unsigned long long ulonglong1_i[32]; + // CHECK: uint64_t ulonglong1_i[32]; ulonglong1 ulonglong1_i[32]; // CHECK: if (ulonglong1_h[12] == ulonglong1_i[12]) {} if (ulonglong1_h[12].x == ulonglong1_i[12].x) {} - // CHECK: ulonglong1_f = (unsigned long long *)ulonglong1_i; + // CHECK: ulonglong1_f = (uint64_t *)ulonglong1_i; ulonglong1_f = (ulonglong1 *)ulonglong1_i; - // CHECK: ulonglong1_a = (unsigned long long)ulonglong1_c; + // CHECK: ulonglong1_a = (uint64_t)ulonglong1_c; ulonglong1_a = (ulonglong1)ulonglong1_c; - // CHECK: ulonglong1_b = unsigned long long(ulonglong1_b); + // CHECK: ulonglong1_b = uint64_t(ulonglong1_b); ulonglong1_b = ulonglong1(ulonglong1_b); - // CHECK: unsigned long long ulonglong1_j, ulonglong1_k, ulonglong1_l, ulonglong1_m[16], *ulonglong1_n[32]; + // CHECK: uint64_t ulonglong1_j, ulonglong1_k, ulonglong1_l, ulonglong1_m[16], *ulonglong1_n[32]; ulonglong1 ulonglong1_j, ulonglong1_k, ulonglong1_l, ulonglong1_m[16], *ulonglong1_n[32]; - // CHECK: int ulonglong1_o = sizeof(unsigned long long); + // CHECK: int ulonglong1_o = sizeof(uint64_t); int ulonglong1_o = sizeof(ulonglong1); // CHECK: int unsigned long long_p = sizeof(unsigned long long); int unsigned long long_p = sizeof(unsigned long long); @@ -2940,8 +2940,8 @@ int main_ulonglong1() { int *ulonglong1_cast; // CHECK: dpct::get_default_queue().submit( // CHECK-NEXT: [&](sycl::handler &cgh) { - // CHECK-NEXT: dpct::access_wrapper ulonglong1_e_acc_ct0(ulonglong1_e, cgh); - // CHECK-NEXT: dpct::access_wrapper ulonglong1_cast_acc_ct1((unsigned long long *)ulonglong1_cast, cgh); + // CHECK-NEXT: dpct::access_wrapper ulonglong1_e_acc_ct0(ulonglong1_e, cgh); + // CHECK-NEXT: dpct::access_wrapper ulonglong1_cast_acc_ct1((uint64_t *)ulonglong1_cast, cgh); // CHECK-EMPTY: // CHECK-NEXT: cgh.parallel_for>( // CHECK-NEXT: sycl::nd_range<3>(sycl::range<3>(1, 1, 1), sycl::range<3>(1, 1, 1)), @@ -2950,8 +2950,8 @@ int main_ulonglong1() { // CHECK-NEXT: }); // CHECK-NEXT: }); kernel_ulonglong1<<<1,1>>>(ulonglong1_e, (ulonglong1 *)ulonglong1_cast); - // CHECK: unsigned long long ulonglong1_r = (unsigned long long){1}; - // CHECK-NEXT: auto ulonglong1_s = (unsigned long long){1}; + // CHECK: uint64_t ulonglong1_r = (uint64_t){1}; + // CHECK-NEXT: auto ulonglong1_s = (uint64_t){1}; ulonglong1 ulonglong1_r = (ulonglong1){1}; auto ulonglong1_s = (ulonglong1){1}; return 0; @@ -3173,31 +3173,31 @@ int main_ulonglong4() { return 0; } -// CHECK: void func3_ushort1(unsigned short a, unsigned short b, unsigned short c) { +// CHECK: void func3_ushort1(uint16_t a, uint16_t b, uint16_t c) { void func3_ushort1(ushort1 a, ushort1 b, ushort1 c) { } -// CHECK: void func_ushort1(unsigned short a) { +// CHECK: void func_ushort1(uint16_t a) { void func_ushort1(ushort1 a) { } -// CHECK: void kernel_ushort1(unsigned short *a, unsigned short *b) { +// CHECK: void kernel_ushort1(uint16_t *a, uint16_t *b) { __global__ void kernel_ushort1(ushort1 *a, ushort1 *b) { } int main_ushort1() { // range default constructor does the right thing. - // CHECK: unsigned short ushort1_a; + // CHECK: uint16_t ushort1_a; ushort1 ushort1_a; - // CHECK: unsigned short ushort1_b = unsigned short(1); + // CHECK: uint16_t ushort1_b = uint16_t(1); ushort1 ushort1_b = make_ushort1(1); - // CHECK: unsigned short ushort1_c = unsigned short(ushort1_b); + // CHECK: uint16_t ushort1_c = uint16_t(ushort1_b); ushort1 ushort1_c = ushort1(ushort1_b); - // CHECK: unsigned short ushort1_d(ushort1_c); + // CHECK: uint16_t ushort1_d(ushort1_c); ushort1 ushort1_d(ushort1_c); - // CHECK: func3_ushort1(ushort1_b, unsigned short(ushort1_b), (unsigned short)ushort1_b); + // CHECK: func3_ushort1(ushort1_b, uint16_t(ushort1_b), (uint16_t)ushort1_b); func3_ushort1(ushort1_b, ushort1(ushort1_b), (ushort1)ushort1_b); - // CHECK: unsigned short *ushort1_e; + // CHECK: uint16_t *ushort1_e; ushort1 *ushort1_e; - // CHECK: unsigned short *ushort1_f; + // CHECK: uint16_t *ushort1_f; ushort1 *ushort1_f; // CHECK: unsigned short ushort1_g = ushort1_c; unsigned short ushort1_g = ushort1_c.x; @@ -3205,21 +3205,21 @@ int main_ushort1() { ushort1_a.x = ushort1_d.x; // CHECK: if (ushort1_b == ushort1_d) {} if (ushort1_b.x == ushort1_d.x) {} - // CHECK: unsigned short ushort1_h[16]; + // CHECK: uint16_t ushort1_h[16]; ushort1 ushort1_h[16]; - // CHECK: unsigned short ushort1_i[32]; + // CHECK: uint16_t ushort1_i[32]; ushort1 ushort1_i[32]; // CHECK: if (ushort1_h[12] == ushort1_i[12]) {} if (ushort1_h[12].x == ushort1_i[12].x) {} - // CHECK: ushort1_f = (unsigned short *)ushort1_i; + // CHECK: ushort1_f = (uint16_t *)ushort1_i; ushort1_f = (ushort1 *)ushort1_i; - // CHECK: ushort1_a = (unsigned short)ushort1_c; + // CHECK: ushort1_a = (uint16_t)ushort1_c; ushort1_a = (ushort1)ushort1_c; - // CHECK: ushort1_b = unsigned short(ushort1_b); + // CHECK: ushort1_b = uint16_t(ushort1_b); ushort1_b = ushort1(ushort1_b); - // CHECK: unsigned short ushort1_j, ushort1_k, ushort1_l, ushort1_m[16], *ushort1_n[32]; + // CHECK: uint16_t ushort1_j, ushort1_k, ushort1_l, ushort1_m[16], *ushort1_n[32]; ushort1 ushort1_j, ushort1_k, ushort1_l, ushort1_m[16], *ushort1_n[32]; - // CHECK: int ushort1_o = sizeof(unsigned short); + // CHECK: int ushort1_o = sizeof(uint16_t); int ushort1_o = sizeof(ushort1); // CHECK: int unsigned short_p = sizeof(unsigned short); int unsigned short_p = sizeof(unsigned short); @@ -3228,8 +3228,8 @@ int main_ushort1() { int *ushort1_cast; // CHECK: dpct::get_default_queue().submit( // CHECK-NEXT: [&](sycl::handler &cgh) { - // CHECK-NEXT: dpct::access_wrapper ushort1_e_acc_ct0(ushort1_e, cgh); - // CHECK-NEXT: dpct::access_wrapper ushort1_cast_acc_ct1((unsigned short *)ushort1_cast, cgh); + // CHECK-NEXT: dpct::access_wrapper ushort1_e_acc_ct0(ushort1_e, cgh); + // CHECK-NEXT: dpct::access_wrapper ushort1_cast_acc_ct1((uint16_t *)ushort1_cast, cgh); // CHECK-EMPTY: // CHECK-NEXT: cgh.parallel_for>( // CHECK-NEXT: sycl::nd_range<3>(sycl::range<3>(1, 1, 1), sycl::range<3>(1, 1, 1)), @@ -3238,8 +3238,8 @@ int main_ushort1() { // CHECK-NEXT: }); // CHECK-NEXT: }); kernel_ushort1<<<1,1>>>(ushort1_e, (ushort1 *)ushort1_cast); - // CHECK: unsigned short ushort1_r = (unsigned short){1}; - // CHECK-NEXT: auto ushort1_s = (unsigned short){1}; + // CHECK: uint16_t ushort1_r = (uint16_t){1}; + // CHECK-NEXT: auto ushort1_s = (uint16_t){1}; ushort1 ushort1_r = (ushort1){1}; auto ushort1_s = (ushort1){1}; return 0; @@ -3494,7 +3494,7 @@ std::vector foo_char2(std::vector a); std::vector foo_char3(std::vector a); std::vector foo_char4(std::vector a); -// CHECK: std::vector const foo_uchar1(std::vector a); +// CHECK: std::vector const foo_uchar1(std::vector a); // CHECK-NEXT: std::vector foo_uchar2(std::vector a); // CHECK-NEXT: std::vector foo_uchar3(std::vector a); // CHECK-NEXT: std::vector foo_uchar4(std::vector a); @@ -3512,7 +3512,7 @@ std::vector foo_short2(std::vector a); std::vector foo_short3(std::vector a); std::vector foo_short4(std::vector a); -// CHECK: std::vector const foo_ushort1(std::vector a); +// CHECK: std::vector const foo_ushort1(std::vector a); // CHECK-NEXT: std::vector foo_ushort2(std::vector a); // CHECK-NEXT: std::vector foo_ushort3(std::vector a); // CHECK-NEXT: std::vector foo_ushort4(std::vector a); @@ -3530,7 +3530,7 @@ std::vector foo_int2(std::vector a); std::vector foo_int3(std::vector a); std::vector foo_int4(std::vector a); -// CHECK: std::vector const foo_uint1(std::vector a); +// CHECK: std::vector const foo_uint1(std::vector a); // CHECK-NEXT: std::vector foo_uint2(std::vector a); // CHECK-NEXT: std::vector foo_uint3(std::vector a); // CHECK-NEXT: std::vector foo_uint4(std::vector a); @@ -3548,7 +3548,7 @@ std::vector foo_long2(std::vector a); std::vector foo_long3(std::vector a); std::vector foo_long4(std::vector a); -// CHECK: std::vector const foo_ulong1(std::vector a); +// CHECK: std::vector const foo_ulong1(std::vector a); // CHECK-NEXT: std::vector foo_ulong2(std::vector a); // CHECK-NEXT: std::vector foo_ulong3(std::vector a); // CHECK-NEXT: std::vector foo_ulong4(std::vector a); @@ -3566,7 +3566,7 @@ std::vector foo_float2(std::vector a); std::vector foo_float3(std::vector a); std::vector foo_float4(std::vector a); -// CHECK: std::vector const foo_longlong1(std::vector a); +// CHECK: std::vector const foo_longlong1(std::vector a); // CHECK-NEXT: std::vector foo_longlong2(std::vector a); // CHECK-NEXT: std::vector foo_longlong3(std::vector a); // CHECK-NEXT: std::vector foo_longlong4(std::vector a); @@ -3575,7 +3575,7 @@ std::vector foo_longlong2(std::vector a); std::vector foo_longlong3(std::vector a); std::vector foo_longlong4(std::vector a); -// CHECK: std::vector const foo_ulonglong1(std::vector a); +// CHECK: std::vector const foo_ulonglong1(std::vector a); // CHECK-NEXT: std::vector foo_ulonglong2(std::vector a); // CHECK-NEXT: std::vector foo_ulonglong3(std::vector a); // CHECK-NEXT: std::vector foo_ulonglong4(std::vector a); diff --git a/clang/test/dpct/vector_type_cub.cu b/clang/test/dpct/vector_type_cub.cu index 059a6fe75090..416d9a93cf80 100644 --- a/clang/test/dpct/vector_type_cub.cu +++ b/clang/test/dpct/vector_type_cub.cu @@ -54,14 +54,14 @@ __global__ void test_make_char4() { } __device__ uchar1 operator+(uchar1 a, uchar1 b) { - // CHECK: return unsigned char(a + b); + // CHECK: return uint8_t(a + b); return make_uchar1(a.x + b.x); } __global__ void test_make_uchar1() { typedef cub::BlockReduce BlockReduce; __shared__ typename BlockReduce::TempStorage smem_storage; - // CHECK: unsigned char res = sycl::reduce_over_group({{.+}}, unsigned char(1.), {{.+}}); + // CHECK: uint8_t res = sycl::reduce_over_group({{.+}}, uint8_t(1.), {{.+}}); uchar1 res = BlockReduce(smem_storage).Sum(make_uchar1(1.)); } @@ -150,14 +150,14 @@ __global__ void test_make_short4() { } __device__ ushort1 operator+(ushort1 a, ushort1 b) { - // CHECK: return unsigned short(a + b); + // CHECK: return uint16_t(a + b); return make_ushort1(a.x + b.x); } __global__ void test_make_ushort1() { typedef cub::BlockReduce BlockReduce; __shared__ typename BlockReduce::TempStorage smem_storage; - // CHECK: unsigned short res = sycl::reduce_over_group({{.+}}, unsigned short(1.), {{.+}}); + // CHECK: uint16_t res = sycl::reduce_over_group({{.+}}, uint16_t(1.), {{.+}}); ushort1 res = BlockReduce(smem_storage).Sum(make_ushort1(1.)); } @@ -246,14 +246,14 @@ __global__ void test_make_int4() { } __device__ uint1 operator+(uint1 a, uint1 b) { - // CHECK: return unsigned int(a + b); + // CHECK: return uint32_t(a + b); return make_uint1(a.x + b.x); } __global__ void test_make_uint1() { typedef cub::BlockReduce BlockReduce; __shared__ typename BlockReduce::TempStorage smem_storage; - // CHECK: unsigned int res = sycl::reduce_over_group({{.+}}, unsigned int(1.), {{.+}}); + // CHECK: uint32_t res = sycl::reduce_over_group({{.+}}, uint32_t(1.), {{.+}}); uint1 res = BlockReduce(smem_storage).Sum(make_uint1(1.)); } @@ -342,14 +342,14 @@ __global__ void test_make_long4() { } __device__ ulong1 operator+(ulong1 a, ulong1 b) { - // CHECK: return unsigned long(a + b); + // CHECK: return uint64_t(a + b); return make_ulong1(a.x + b.x); } __global__ void test_make_ulong1() { typedef cub::BlockReduce BlockReduce; __shared__ typename BlockReduce::TempStorage smem_storage; - // CHECK: unsigned long res = sycl::reduce_over_group({{.+}}, unsigned long(1.), {{.+}}); + // CHECK: uint64_t res = sycl::reduce_over_group({{.+}}, uint64_t(1.), {{.+}}); ulong1 res = BlockReduce(smem_storage).Sum(make_ulong1(1.)); } @@ -390,14 +390,14 @@ __global__ void test_make_ulong4() { } __device__ longlong1 operator+(longlong1 a, longlong1 b) { - // CHECK: return long long(a + b); + // CHECK: return int64_t(a + b); return make_longlong1(a.x + b.x); } __global__ void test_make_longlong1() { typedef cub::BlockReduce BlockReduce; __shared__ typename BlockReduce::TempStorage smem_storage; - // CHECK: long long res = sycl::reduce_over_group({{.+}}, long long(1.), {{.+}}); + // CHECK: int64_t res = sycl::reduce_over_group({{.+}}, int64_t(1.), {{.+}}); longlong1 res = BlockReduce(smem_storage).Sum(make_longlong1(1.)); } @@ -438,14 +438,14 @@ __global__ void test_make_longlong4() { } __device__ ulonglong1 operator+(ulonglong1 a, ulonglong1 b) { - // CHECK: return unsigned long long(a + b); + // CHECK: return uint64_t(a + b); return make_ulonglong1(a.x + b.x); } __global__ void test_make_ulonglong1() { typedef cub::BlockReduce BlockReduce; __shared__ typename BlockReduce::TempStorage smem_storage; - // CHECK: unsigned long long res = sycl::reduce_over_group({{.+}}, unsigned long long(1.), {{.+}}); + // CHECK: uint64_t res = sycl::reduce_over_group({{.+}}, uint64_t(1.), {{.+}}); ulonglong1 res = BlockReduce(smem_storage).Sum(make_ulonglong1(1.)); }