diff --git a/sycl/source/detail/device_kernel_info.cpp b/sycl/source/detail/device_kernel_info.cpp index c221d668cbd99..ce4b27d12b5f7 100644 --- a/sycl/source/detail/device_kernel_info.cpp +++ b/sycl/source/detail/device_kernel_info.cpp @@ -61,7 +61,7 @@ inline constexpr bool operator==(const CompileTimeKernelInfoTy &LHS, void DeviceKernelInfo::setCompileTimeInfoIfNeeded( const CompileTimeKernelInfoTy &Info) { - if (isCompileTimeInfoSet()) + if (!isCompileTimeInfoSet()) CompileTimeKernelInfoTy::operator=(Info); assert(isCompileTimeInfoSet()); assert(Info == *this);