[PATCH] D114099: Enable `_Float16` type support on X86 without the avx512fp16 flag

Phoebe Wang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 17 18:13:51 PST 2021


pengfei added inline comments.


================
Comment at: clang/lib/Basic/Targets/X86.cpp:371
   }
+  // Turn on _float16 for x86 (feature sse+)
+  HasFloat16 = SSELevel >= SSE2;
----------------
sse2?


================
Comment at: clang/lib/Basic/Targets/X86.cpp:372
+  // Turn on _float16 for x86 (feature sse+)
+  HasFloat16 = SSELevel >= SSE2;
 
----------------
rjmccall wrote:
> Out of curiosity, why SSE2?  SSE2 adds double-precision, but we just need single-precision, which is in the original SSE.
> 
> It doesn't much matter anymore, of course, since both are ubiquitous.
https://lists.llvm.org/pipermail/llvm-dev/2021-July/151618.html


================
Comment at: clang/test/CodeGen/X86/avx512fp16-abi.c:1
 // RUN: %clang_cc1 -triple x86_64-linux -emit-llvm  -target-feature +avx512fp16 < %s | FileCheck %s --check-prefixes=CHECK,CHECK-C
+// RUN: %clang_cc1 -triple x86_64-linux -emit-llvm  < %s | FileCheck %s --check-prefixes=CHECK,CHECK-C
----------------
Why don't move it to fp16-abi.c directly?


================
Comment at: clang/test/CodeGen/X86/avx512fp16-complex.c:1
 // RUN: %clang_cc1 %s -O0 -emit-llvm -triple x86_64-unknown-unknown -target-feature +avx512fp16 -o - | FileCheck %s --check-prefix=X86
+// RUN: %clang_cc1 %s -O0 -emit-llvm -triple x86_64-unknown-unknown -o - | FileCheck %s --check-prefix=X86
----------------
Change the file name?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114099



More information about the cfe-commits mailing list