File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,9 @@ template <int dimensions = 1> class id : public detail::array<dimensions> {
97
97
* int a = id<1>(value); */
98
98
99
99
operator EnableIfT<(dimensions == 1 ), size_t >() const {
100
- return this ->common_array [0 ];
100
+ size_t Result = this ->common_array [0 ];
101
+ __SYCL_ASSUME_INT (Result);
102
+ return Result;
101
103
}
102
104
#endif // __SYCL_DISABLE_ID_TO_INT_CONV__
103
105
Original file line number Diff line number Diff line change @@ -39,6 +39,13 @@ int main() {
39
39
// CHECK: call void @llvm.assume(i1 {{.*}})
40
40
int LocalRange = TestNDItem.get_local_range (0 );
41
41
42
+ int GlobalIdConverted = TestNDItem.get_global_id ();
43
+ // CHECK: call void @llvm.assume(i1 {{.*}})
44
+ int LocalIdConverted = TestNDItem.get_local_id ();
45
+ // CHECK: call void @llvm.assume(i1 {{.*}})
46
+ int OffsetConferted = TestNDItem.get_offset ();
47
+ // CHECK: call void @llvm.assume(i1 {{.*}})
48
+
42
49
return 0 ;
43
50
}
44
51
// CHECK: }
You can’t perform that action at this time.
0 commit comments