9
9
// UNSUPPORTED: cuda || hip
10
10
// RUN: %clangxx -fsycl %s -o %t.out
11
11
// RUN: %GPU_RUN_PLACEHOLDER %t.out
12
- // XFAIL: *
13
- // TODO: once BE problem is fixed and this test starts to pass, need to also
14
- // enable TEST_VECTOR_VAR_MASK test cases in slm_gather_scatter_heavy.cpp
15
12
//
16
13
// This is a regression test for the VC BE bug which generates incorrect code in
17
14
// some cases in presence of variable (not compile-time constant) mask
@@ -44,16 +41,16 @@ struct KernelAcc {
44
41
#endif
45
42
#ifdef USE_RAW_API
46
43
constexpr int val = MASKED_LANE;
47
- simd<int , VL>::vector_type v{val, val, val, val, val, val, val, val};
48
- simd_mask<VL>::vector_type pred{1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 };
44
+ simd<int , VL>::raw_vector_type v{val, val, val, val, val, val, val, val};
45
+ simd_mask<VL>::raw_vector_type pred{1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 };
49
46
pred[masked_lane] = 0 ;
50
47
#if defined(USE_WORKAROUND)
51
- pred = __builtin_convertvector (pred == 1 , simd_mask<VL>::vector_type );
48
+ pred = __builtin_convertvector (pred == 1 , simd_mask<VL>::raw_vector_type );
52
49
#endif
53
- simd<uint32_t , VL>::vector_type offsets = {0 , 4 , 8 , 12 , 16 , 20 , 24 , 28 };
50
+ simd<uint32_t , VL>::raw_vector_type offsets = {0 , 4 , 8 , 12 , 16 , 20 , 24 , 28 };
54
51
SurfaceIndex si = get_surface_index (acc);
55
- __esimd_scatter_scaled<int , VL, unsigned int , 2 , 0 , CacheHint::None ,
56
- CacheHint::None>(pred, si, 0 , offsets, v);
52
+ __esimd_scatter_scaled<int , VL, unsigned int , 2 , 0 >(pred, si, 0 , offsets ,
53
+ v);
57
54
#else
58
55
simd<int , VL> v (MASKED_LANE);
59
56
simd_mask<VL> pred = 1 ;
@@ -138,7 +135,7 @@ int main(int argc, char **argv) {
138
135
std::cout << " Running on " << dev.get_info <info::device::name>() << " \n " ;
139
136
std::cout << " MaskedLane=" << MASKED_LANE << " \n " ;
140
137
141
- bool passed = false ;
138
+ bool passed = true ;
142
139
143
140
passed &= test (" accessor" , q, [&](int *B) {
144
141
sycl::buffer<int , 1 > Bbuf (B, range<1 >(VL));
@@ -157,6 +154,6 @@ int main(int argc, char **argv) {
157
154
});
158
155
});
159
156
160
- std::cout << (passed ? " Test FAILED \n " : " Test passed \n " );
157
+ std::cout << (passed ? " Test passed \n " : " Test FAILED \n " );
161
158
return passed ? 0 : 1 ;
162
159
}
0 commit comments