[PATCH] D145765: Add __builtin_set_flt_rounds

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 13 07:08:39 PDT 2023


aaron.ballman added a comment.

Thanks for the additional tests! Can you also add a release note to `clang/docs/ReleaseNotes.rst` and document the new builtin in `clang\docs\LanguageExtensions.rst`?



================
Comment at: clang/test/Sema/builtin_set_flt_rounds.c:1-11
+// RUN: %clang_cc1 -triple mipsel-unknown-linux  -fsyntax-only %s -verify
+// RUN: %clang_cc1 -triple x86_64-gnu-linux -fsyntax-only %s -verify
+struct S {int a;};
+void test_builtin_set_flt_rounds() {
+#ifndef __x86_64__
+  __builtin_set_flt_rounds(1); // expected-error {{builtin is not supported on this target}}
+#else
----------------
Simplify the test somewhat.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145765



More information about the cfe-commits mailing list