From 61f290578c0923263d4551e1f8287d4bcd71da95 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Wed, 11 Oct 2017 16:06:08 +0000 Subject: [PATCH] [X86] Correct type for argument to clflushopt intrinsic. Summary: According to Intel docs this should take void const *. We had char*. The lack of const is the main issue. Reviewers: RKSimon, zvi, igorb Reviewed By: igorb Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38782 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@315470 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/BuiltinsX86.def | 2 +- lib/Headers/clflushoptintrin.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/clang/Basic/BuiltinsX86.def b/include/clang/Basic/BuiltinsX86.def index c0fc5eb748..02e46afb25 100644 --- a/include/clang/Basic/BuiltinsX86.def +++ b/include/clang/Basic/BuiltinsX86.def @@ -639,7 +639,7 @@ TARGET_BUILTIN(__builtin_ia32_xsavec, "vv*ULLi", "", "xsavec") TARGET_BUILTIN(__builtin_ia32_xsaves, "vv*ULLi", "", "xsaves") //CLFLUSHOPT -TARGET_BUILTIN(__builtin_ia32_clflushopt, "vc*", "", "clflushopt") +TARGET_BUILTIN(__builtin_ia32_clflushopt, "vvC*", "", "clflushopt") // ADX TARGET_BUILTIN(__builtin_ia32_addcarryx_u32, "UcUcUiUiUi*", "", "adx") diff --git a/lib/Headers/clflushoptintrin.h b/lib/Headers/clflushoptintrin.h index 60e0ead762..f1f1330234 100644 --- a/lib/Headers/clflushoptintrin.h +++ b/lib/Headers/clflushoptintrin.h @@ -32,7 +32,7 @@ #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("clflushopt"))) static __inline__ void __DEFAULT_FN_ATTRS -_mm_clflushopt(char * __m) { +_mm_clflushopt(void const * __m) { __builtin_ia32_clflushopt(__m); } -- 2.40.0