|
168 | 168 | ; } s;
|
169 | 169 | ; s.field = 0;
|
170 | 170 | ; }
|
| 171 | +; void memory_attribute_on_array() { |
| 172 | +; [[intelfpga::register]] int register_var[32]; |
| 173 | +; } |
171 | 174 | ;
|
172 | 175 | ; template <typename name, typename Func>
|
173 | 176 | ; __attribute__((sycl_kernel)) void kernel_single_task(Func kernelFunc) {
|
|
194 | 197 | ; templ_bank_bits_attr<4, 5>();
|
195 | 198 | ; force_pow2_depth_attr();
|
196 | 199 | ; templ_force_pow2_depth_attr<1>();
|
| 200 | +; memory_attribute_on_array(); |
197 | 201 | ; });
|
198 | 202 | ; return 0;
|
199 | 203 | ; }
|
@@ -304,6 +308,7 @@ target triple = "spir"
|
304 | 308 | ; CHECK-LLVM: [[STR_FP2_SCT:@[0-9_.]+]] = {{.*}}{memory:DEFAULT}{force_pow2_depth:1}
|
305 | 309 | ; CHECK-LLVM: [[STR_FP2_TE1:@[0-9_.]+]] = {{.*}}{memory:DEFAULT}{force_pow2_depth:1}
|
306 | 310 | ; CHECK-LLVM: [[STR_FP2_TE2:@[0-9_.]+]] = {{.*}}{memory:DEFAULT}{force_pow2_depth:1}
|
| 311 | +; CHECK-LLVM: [[STR_REG_ARR:@[0-9_.]+]] = {{.*}}{register:1} |
307 | 312 | @.str = private unnamed_addr constant [42 x i8] c"{memory:DEFAULT}{sizeinfo:4}{numbanks:16}\00", section "llvm.metadata"
|
308 | 313 | @.str.1 = private unnamed_addr constant [25 x i8] c"intel-fpga-local-var.cpp\00", section "llvm.metadata"
|
309 | 314 | @.str.2 = private unnamed_addr constant [41 x i8] c"{memory:DEFAULT}{sizeinfo:4}{numbanks:2}\00", section "llvm.metadata"
|
@@ -371,6 +376,7 @@ entry:
|
371 | 376 | call spir_func void @_Z20templ_bank_bits_attrILi4ELi5EEvv()
|
372 | 377 | call spir_func void @_Z21force_pow2_depth_attrv()
|
373 | 378 | call spir_func void @_Z27templ_force_pow2_depth_attrILi1EEvv()
|
| 379 | + call spir_func void @_Z25memory_attribute_on_arrayv() |
374 | 380 | ret void
|
375 | 381 | }
|
376 | 382 |
|
@@ -814,6 +820,18 @@ entry:
|
814 | 820 | ret void
|
815 | 821 | }
|
816 | 822 |
|
| 823 | +; Function Attrs: convergent noinline norecurse nounwind optnone mustprogress |
| 824 | +define dso_local spir_func void @_Z25memory_attribute_on_arrayv() #2 { |
| 825 | +entry: |
| 826 | + %register_var = alloca [32 x i32], align 4 |
| 827 | + %register_var.ascast = addrspacecast [32 x i32]* %register_var to [32 x i32] addrspace(4)* |
| 828 | + %register_var.ascast1 = bitcast [32 x i32] addrspace(4)* %register_var.ascast to i8 addrspace(4)* |
| 829 | + %register_var.ascast2 = addrspacecast i8 addrspace(4)* %register_var.ascast1 to i8* |
| 830 | + ; CHECK-LLVM: call void @llvm.var.annotation(i8* %{{[a-zA-Z0-9_.]+}}, i8* getelementptr inbounds ([{{[0-9]+}} x i8], [{{[0-9]+}} x i8]* [[STR_REG_ARR]], i32 0, i32 0), i8* undef, i32 undef, i8* undef) |
| 831 | + call void @llvm.var.annotation(i8* %register_var.ascast2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i32 0, i32 0), i32 2, i8* null) |
| 832 | + ret void |
| 833 | +} |
| 834 | + |
817 | 835 | attributes #0 = { norecurse nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="none" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "sycl-module-id"="intel-fpga-local-var.cpp" "uniform-work-group-size"="true" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
818 | 836 | attributes #1 = { argmemonly nounwind willreturn }
|
819 | 837 | attributes #2 = { inlinehint norecurse nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="none" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
|
0 commit comments