Skip to content

Commit 1502b4b

Browse files
author
iclsrc
committed
Merge from 'sycl' to 'sycl-web'
2 parents f2ea6b1 + a7e8bfa commit 1502b4b

File tree

5 files changed

+40
-4
lines changed

5 files changed

+40
-4
lines changed

llvm/lib/SYCLLowerIR/LowerESIMD.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,8 @@ static void translateUnPackMask(CallInst &CI) {
789789
if (Width > N) {
790790
llvm::Type *Ty = llvm::IntegerType::get(Context, N);
791791
Arg0 = Builder.CreateTrunc(Arg0, Ty);
792-
cast<llvm::Instruction>(Arg0)->setDebugLoc(CI.getDebugLoc());
792+
if (auto *Trunc = dyn_cast<llvm::Instruction>(Arg0))
793+
Trunc->setDebugLoc(CI.getDebugLoc());
793794
}
794795
assert(Arg0->getType()->getPrimitiveSizeInBits() == N);
795796
Arg0 = Builder.CreateBitCast(

llvm/test/SYCLLowerIR/esimd_lower_crash_zext.ll

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,13 @@ define spir_func <32 x i16> @_Z3foov() {
1313
}
1414

1515
declare dso_local spir_func <32 x i16> @_Z19__esimd_unpack_maskILi32EEN2cl4sycl5INTEL3gpu11vector_typeItXT_EE4typeEj(i32)
16+
17+
define spir_func <16 x i16> @_Z3barv() {
18+
; CHECK-LABEL: @_Z3barv(
19+
; CHECK: ret <16 x i16> zext (<16 x i1> bitcast (<1 x i16> <i16 15> to <16 x i1>) to <16 x i16>)
20+
;
21+
%call.i.i = call spir_func <16 x i16> @_Z19__esimd_unpack_maskILi16EEN2cl4sycl3ext5intel12experimental5esimd6detail11vector_typeItXT_EE4typeEj(i32 15)
22+
ret <16 x i16> %call.i.i
23+
}
24+
25+
declare dso_local spir_func <16 x i16> @_Z19__esimd_unpack_maskILi16EEN2cl4sycl3ext5intel12experimental5esimd6detail11vector_typeItXT_EE4typeEj(i32)

llvm/tools/sycl-post-link/sycl-post-link.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ static void collectKernelModuleMap(
319319
}
320320
case Scope_Global:
321321
// the map key is not significant here
322-
ResKernelModuleMap["<GLOBAL>"].push_back(&F);
322+
ResKernelModuleMap[GLOBAL_SCOPE_NAME].push_back(&F);
323323
break;
324324
}
325325
}

sycl/doc/extensions/Uniform/Uniform.asciidoc

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,28 @@ namespace experimental {
110110
111111
template <class T>
112112
class uniform {
113+
public:
113114
explicit uniform(T x) noexcept;
114-
operator T() const;
115+
operator const T() const;
116+
117+
uniform& operator=(const uniform&) = delete;
118+
119+
/* Other explicitly deleted operators improve error messages
120+
if a user incorrectly attempts to modify a uniform */
121+
uniform& operator+=(const T&) = delete;
122+
uniform& operator-=(const T&) = delete;
123+
uniform& operator*=(const T&) = delete;
124+
uniform& operator/=(const T&) = delete;
125+
uniform& operator%=(const T&) = delete;
126+
uniform& operator&=(const T&) = delete;
127+
uniform& operator|=(const T&) = delete;
128+
uniform& operator^=(const T&) = delete;
129+
uniform& operator<<=(const T&) = delete;
130+
uniform& operator>>=(const T&) = delete;
131+
uniform& operator++() = delete;
132+
uniform& operator++(int) = delete;
133+
uniform& operator--() = delete;
134+
uniform& operator--(int) = delete;
115135
};
116136
117137
} // namespace experimental
@@ -181,6 +201,7 @@ float x = array[sycl::ext::oneapi::experimental::uniform(index)];
181201
|========================================
182202
|Rev|Date|Author|Changes
183203
|1|2021-04-23|John Pennycook|*Initial public working draft*
204+
|2|2021-08-03|John Pennycook|*Add const and deleted operators*
184205
|========================================
185206
186207
//************************************************************************

sycl/include/CL/sycl/queue.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@
2222
#include <CL/sycl/property_list.hpp>
2323
#include <CL/sycl/stl.hpp>
2424

25-
#include <inttypes.h>
25+
// Explicitly request format macros
26+
#ifndef __STDC_FORMAT_MACROS
27+
#define __STDC_FORMAT_MACROS 1
28+
#endif
29+
#include <cinttypes>
2630
#include <utility>
2731

2832
// having _TWO_ mid-param #ifdefs makes the functions very difficult to read.

0 commit comments

Comments
 (0)