[PATCH] D114782: [X86][clang] Emit diagnostic for float and double when we have features -x87 and -sse on 64-bits

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 9 17:26:00 PST 2021


phosek added a comment.

In D114782#3184317 <https://reviews.llvm.org/D114782#3184317>, @pengfei wrote:

> Hi @phosek , thanks for reporting it.
> I would consider it as a misuse of the header file when SSE is not usable, especially we now have the specific header "x86gprintrin.h" for such scenarios. Can you help to try if changing to "x86gprintrin.h" works?

It's a normal practice to compile with `-mno-{sse,avx}` and then use SSE/AVX intrinsics explicitly inside runtime cpuid conditionals.  The function calling the intrinsic might be marked with `__attribute__((target("avx")))`, but the source file's ambient `-mo-{sse,avx}` will be in force when `#include <immintrin.h>` is done. This change breaks that practice which is likely going to affect existing codebases.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114782



More information about the cfe-commits mailing list