Skip to content

Commit 3508400

Browse files
committed
[SYCL] Fix generation of intel_fpga_mem builtin
1 parent 634156a commit 3508400

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

clang/lib/CodeGen/CGBuiltin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21467,7 +21467,7 @@ RValue CodeGenFunction::EmitIntelFPGAMemBuiltin(const CallExpr *E) {
2146721467

2146821468
llvm::Value *Ann = EmitAnnotationCall(F, PtrVal, AnnotStr, SourceLocation());
2146921469

21470-
cast<CallBase>(Ann)->addFnAttr(llvm::Attribute::ReadNone);
21470+
cast<CallBase>(Ann)->setDoesNotAccessMemory();
2147121471

2147221472
return RValue::get(Ann);
2147321473
}

clang/test/CodeGenSYCL/intel-fpga-mem-builtin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ void foo(float *A, int *B, State *C, State &D) {
9797
z = __builtin_intel_fpga_mem(&D, PARAM_1 | PARAM_2, 128, 4, TestVal1, TestVal2);
9898
}
9999

100-
// CHECK-DAG: attributes [[ATT]] = { readnone }
100+
// CHECK-DAG: attributes [[ATT]] = { memory(none) }
101101

102102
template <typename name, typename Func>
103103
__attribute__((sycl_kernel)) void kernel_single_task(const Func &kernelFunc) {

clang/test/CodeGenSYCL/no-opaque-ptr-intel-fpga-mem-builtin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ void foo(float *A, int *B, State *C, State &D) {
9797
z = __builtin_intel_fpga_mem(&D, PARAM_1 | PARAM_2, 128, 4, TestVal1, TestVal2);
9898
}
9999

100-
// CHECK-DAG: attributes [[ATT]] = { readnone }
100+
// CHECK-DAG: attributes [[ATT]] = { memory(none) }
101101

102102
template <typename name, typename Func>
103103
__attribute__((sycl_kernel)) void kernel_single_task(const Func &kernelFunc) {

clang/test/CodeGenSYCL/no_opaque_intel-fpga-mem-builtin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ void foo(float *A, int *B, State *C, State &D) {
6767
f = __builtin_intel_fpga_mem(&F, PARAM_1 | PARAM_2, 127);
6868
}
6969

70-
// CHECK-DAG: attributes [[ATT]] = { readnone }
70+
// CHECK-DAG: attributes [[ATT]] = { memory(none) }
7171

7272
template <typename name, typename Func>
7373
__attribute__((sycl_kernel)) void kernel_single_task(const Func &kernelFunc) {

0 commit comments

Comments
 (0)