diff --git a/sycl/include/sycl/ext/intel/esimd/memory.hpp b/sycl/include/sycl/ext/intel/esimd/memory.hpp index 5d8f13ce82619..7e7f0b80759c0 100644 --- a/sycl/include/sycl/ext/intel/esimd/memory.hpp +++ b/sycl/include/sycl/ext/intel/esimd/memory.hpp @@ -3921,7 +3921,7 @@ slm_gather(simd byte_offsets, simd_mask mask, static_assert(Alignment >= sizeof(T), "slm_gather() requires at least element-size alignment"); - if constexpr (VS > 1 || (!detail::isPowerOf2(N, 32) && + if constexpr (VS > 1 || (!(detail::isPowerOf2(N, 32) && sizeof(T) <= 4) && !detail::isMaskedGatherScatterLLVMAvailable())) { simd PassThru; // Intentionally undefined return detail::slm_gather_impl( diff --git a/sycl/test/esimd/memory_properties.cpp b/sycl/test/esimd/memory_properties.cpp index 31dbc3e889f4b..936464cd1ff07 100644 --- a/sycl/test/esimd/memory_properties.cpp +++ b/sycl/test/esimd/memory_properties.cpp @@ -1303,4 +1303,9 @@ test_slm_gather_scatter(int byte_offset32) { props_align4); slm = slm_gather(ioffset_n16_view, mask_n16, pass_thru_view, props_align4); + + // Special case to verify calls to slm_gather with 64 bit data type are + // transformed to lsc calls + // CHECK-COUNT-1: call <32 x double> @llvm.masked.gather.v32f64.v32p3(<32 x ptr addrspace(3)> {{[^)]+}}, i32 8, <32 x i1> {{[^)]+}}, <32 x double> {{[^)]+}}) + auto slm_double = slm_gather(ioffset_n32, mask_n32); }