[PATCH] D142583: [SPIR-V] Add support for __arithmetic_fence builtin for SYCL targets.

Alexey Bader via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 25 14:27:00 PST 2023


bader added a comment.

"[SPIR-V] Add support for __arithmetic_fence builtin for SYCL targets." -> "[SPIR] Add support for __arithmetic_fence builtin for SPIR target."



================
Comment at: clang/test/CodeGen/arithmetic-fence-builtin.c:16
+// Test with fast math on spir target
+// RUN: %clang_cc1 -triple spir64  -emit-llvm -fsycl-is-device \
+// RUN: -mreassociate -o - %s \
----------------



================
Comment at: clang/test/CodeGen/arithmetic-fence-builtin.c:74
 int subit(float a, float b, float *fp) {
-  // CHECKFAST: define {{.*}}@subit(float noundef %a, float noundef %b{{.*}}
+  // CHECKPRECISE: define {{.*}}@subit(float noundef %a, float noundef %b{{.*}}
   *fp = __arithmetic_fence(a - b);
----------------
What is different for SPIR target here?


================
Comment at: clang/test/Sema/arithmetic-fence-builtin.c:5
 // RUN:            -fprotect-parens 2>&1 | FileCheck -check-prefix=PPC %s
+// RUN: %clang_cc1 -triple spir64  -emit-llvm -fsycl-is-device \
+// RUN: -o - -verify -x c++ %s
----------------



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142583/new/

https://reviews.llvm.org/D142583



More information about the cfe-commits mailing list