[PATCH] D94614: [FPEnv][X86] Platform builtins edition: clang should get from the AST the metadata for constrained FP builtins

Kevin P. Neal via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 19 06:37:09 PST 2021


kpn added inline comments.


================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:12268
+  case X86::BI__builtin_ia32_cvtqq2pd512_mask: {
+    CodeGenFunction::CGFPOptionsRAII FPOptsRAII(*this, E);
     return EmitX86ConvertIntToFp(*this, Ops, /*IsSigned*/true);
----------------
pengfei wrote:
> Maybe better to move it into these Emit* functions?
Certainly. Will do.


================
Comment at: clang/test/CodeGen/X86/avx512dq-builtins-constrained.c:3
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512dq -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefix=UNCONSTRAINED --check-prefix=COMMON --check-prefix=COMMONIR
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512dq -ffp-exception-behavior=maytrap -DSTRICT=1 -emit-llvm -o - -Wall -Werror | tee /tmp/X | FileCheck %s --check-prefix=CONSTRAINED --check-prefix=COMMON --check-prefix=COMMONIR
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512dq -S -o - -Wall -Werror | FileCheck %s --check-prefix=CHECK-ASM --check-prefix=COMMON
----------------
pengfei wrote:
> Where is the file used? It results in failure on Windows.
Because I forgot to remove the "tee" command perhaps?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94614



More information about the cfe-commits mailing list