aaron.ballman added a comment. Thank you for this! You should also add a release note and some documentation for the new builtin.
================ Comment at: clang/test/CodeGen/builtin_set_flt_rounds.c:1-4 +// RUN: %clang_cc1 -triple x86_64-gnu-linux %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-windows-msvc %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -triple aarch64-gnu-linux %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -triple aarch64-windows-msvc %s -emit-llvm -o - | FileCheck %s ---------------- Minor cleanup. ================ Comment at: clang/test/CodeGen/builtin_set_flt_rounds.c:5-7 +void test_builtin_set_flt_rounds() { + __builtin_set_flt_rounds(1); + // CHECK: call void @llvm.set.rounding(i32 1) ---------------- I think you should also add some Sema tests for correct and misuse of the builtin: ``` __builtin_set_flt_rounds(1); // OK struct S { int a; } s; __builtin_set_flt_rounds(s); // This should diagnose, right? __builtin_set_flt_rounds(1.0f); // Should this implicitly convert or is this an error? ``` and that sema test can additionally test what happens when you call the builtin on an unsupported architecture. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145765/new/ https://reviews.llvm.org/D145765 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits