r278814 - Revert "[X86] Add xgetbv/x[X86] Add xgetbv xsetbv intrinsics to non-windows platforms"

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 16 09:04:15 PDT 2016


Author: rnk
Date: Tue Aug 16 11:04:14 2016
New Revision: 278814

URL: http://llvm.org/viewvc/llvm-project?rev=278814&view=rev
Log:
Revert "[X86] Add xgetbv/x[X86] Add xgetbv xsetbv intrinsics to non-windows platforms"

This reverts commit r278783.  It breaks usage of _xgetbv on Windows.

Modified:
    cfe/trunk/include/clang/Basic/BuiltinsX86.def
    cfe/trunk/lib/CodeGen/CGBuiltin.cpp
    cfe/trunk/lib/Headers/intrin.h
    cfe/trunk/lib/Headers/xsaveintrin.h
    cfe/trunk/test/CodeGen/builtins-x86.c
    cfe/trunk/test/CodeGen/x86_32-xsave.c
    cfe/trunk/test/CodeGen/x86_64-xsave.c
    cfe/trunk/test/Headers/ms-intrin.cpp

Modified: cfe/trunk/include/clang/Basic/BuiltinsX86.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/BuiltinsX86.def?rev=278814&r1=278813&r2=278814&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/BuiltinsX86.def (original)
+++ cfe/trunk/include/clang/Basic/BuiltinsX86.def Tue Aug 16 11:04:14 2016
@@ -644,8 +644,6 @@ TARGET_BUILTIN(__builtin_ia32_fxsave64,
 // XSAVE
 TARGET_BUILTIN(__builtin_ia32_xsave, "vv*ULLi", "", "xsave")
 TARGET_BUILTIN(__builtin_ia32_xsave64, "vv*ULLi", "", "xsave")
-TARGET_BUILTIN(__builtin_ia32_xgetbv, "ULLiUi", "", "xsave")
-TARGET_BUILTIN(__builtin_ia32_xsetbv, "vUiULLi", "", "xsave")
 TARGET_BUILTIN(__builtin_ia32_xrstor, "vv*ULLi", "", "xsave")
 TARGET_BUILTIN(__builtin_ia32_xrstor64, "vv*ULLi", "", "xsave")
 TARGET_BUILTIN(__builtin_ia32_xsaveopt, "vv*ULLi", "", "xsaveopt")

Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBuiltin.cpp?rev=278814&r1=278813&r2=278814&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBuiltin.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBuiltin.cpp Tue Aug 16 11:04:14 2016
@@ -6915,8 +6915,7 @@ Value *CodeGenFunction::EmitX86BuiltinEx
   case X86::BI__builtin_ia32_xsavec:
   case X86::BI__builtin_ia32_xsavec64:
   case X86::BI__builtin_ia32_xsaves:
-  case X86::BI__builtin_ia32_xsaves64:
-  case X86::BI__builtin_ia32_xsetbv: {
+  case X86::BI__builtin_ia32_xsaves64: {
     Intrinsic::ID ID;
 #define INTRINSIC_X86_XSAVE_ID(NAME) \
     case X86::BI__builtin_ia32_##NAME: \
@@ -6936,7 +6935,6 @@ Value *CodeGenFunction::EmitX86BuiltinEx
     INTRINSIC_X86_XSAVE_ID(xsavec64);
     INTRINSIC_X86_XSAVE_ID(xsaves);
     INTRINSIC_X86_XSAVE_ID(xsaves64);
-    INTRINSIC_X86_XSAVE_ID(xsetbv);
     }
 #undef INTRINSIC_X86_XSAVE_ID
     Value *Mhi = Builder.CreateTrunc(
@@ -6946,8 +6944,6 @@ Value *CodeGenFunction::EmitX86BuiltinEx
     Ops.push_back(Mlo);
     return Builder.CreateCall(CGM.getIntrinsic(ID), Ops);
   }
-  case X86::BI__builtin_ia32_xgetbv:
-    return Builder.CreateCall(CGM.getIntrinsic(Intrinsic::x86_xgetbv), Ops);
   case X86::BI__builtin_ia32_storedqudi128_mask:
   case X86::BI__builtin_ia32_storedqusi128_mask:
   case X86::BI__builtin_ia32_storedquhi128_mask:

Modified: cfe/trunk/lib/Headers/intrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/intrin.h?rev=278814&r1=278813&r2=278814&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/intrin.h (original)
+++ cfe/trunk/lib/Headers/intrin.h Tue Aug 16 11:04:14 2016
@@ -289,6 +289,10 @@ static __inline__
 void _WriteBarrier(void);
 unsigned __int32 xbegin(void);
 void _xend(void);
+static __inline__
+#define _XCR_XFEATURE_ENABLED_MASK 0
+unsigned __int64 __cdecl _xgetbv(unsigned int);
+void __cdecl _xsetbv(unsigned int, unsigned __int64);
 
 /* These additional intrinsics are turned on in x64/amd64/x86_64 mode. */
 #ifdef __x86_64__
@@ -904,6 +908,12 @@ __cpuidex(int __info[4], int __level, in
   __asm__ ("cpuid" : "=a"(__info[0]), "=b" (__info[1]), "=c"(__info[2]), "=d"(__info[3])
                    : "a"(__level), "c"(__ecx));
 }
+static __inline__ unsigned __int64 __cdecl __DEFAULT_FN_ATTRS
+_xgetbv(unsigned int __xcr_no) {
+  unsigned int __eax, __edx;
+  __asm__ ("xgetbv" : "=a" (__eax), "=d" (__edx) : "c" (__xcr_no));
+  return ((unsigned __int64)__edx << 32) | __eax;
+}
 static __inline__ void __DEFAULT_FN_ATTRS
 __halt(void) {
   __asm__ volatile ("hlt");

Modified: cfe/trunk/lib/Headers/xsaveintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/xsaveintrin.h?rev=278814&r1=278813&r2=278814&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/xsaveintrin.h (original)
+++ cfe/trunk/lib/Headers/xsaveintrin.h Tue Aug 16 11:04:14 2016
@@ -28,8 +28,6 @@
 #ifndef __XSAVEINTRIN_H
 #define __XSAVEINTRIN_H
 
-#define _XCR_XFEATURE_ENABLED_MASK 0
-
 /* Define the default attributes for the functions in this file. */
 #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__,  __target__("xsave")))
 
@@ -43,16 +41,6 @@ _xrstor(void *__p, unsigned long long __
   return __builtin_ia32_xrstor(__p, __m);
 }
 
-static __inline__ unsigned long long __DEFAULT_FN_ATTRS
-_xgetbv(unsigned int __a) {
-  return  __builtin_ia32_xgetbv(__a);
-}
-
-static __inline__ void __DEFAULT_FN_ATTRS
-_xsetbv(unsigned int __a, unsigned long long __b) {
-  __builtin_ia32_xsetbv(__a, __b);
-}
-
 #ifdef __x86_64__
 static __inline__ void __DEFAULT_FN_ATTRS
 _xsave64(void *__p, unsigned long long __m) {
@@ -63,7 +51,6 @@ static __inline__ void __DEFAULT_FN_ATTR
 _xrstor64(void *__p, unsigned long long __m) {
   return __builtin_ia32_xrstor64(__p, __m);
 }
-
 #endif
 
 #undef __DEFAULT_FN_ATTRS

Modified: cfe/trunk/test/CodeGen/builtins-x86.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/builtins-x86.c?rev=278814&r1=278813&r2=278814&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/builtins-x86.c (original)
+++ cfe/trunk/test/CodeGen/builtins-x86.c Tue Aug 16 11:04:14 2016
@@ -270,8 +270,6 @@ void f0() {
 
   (void)__builtin_ia32_xsave(tmp_vp, tmp_ULLi);
   (void)__builtin_ia32_xsave64(tmp_vp, tmp_ULLi);
-  tmp_ULLi = __builtin_ia32_xgetbv(tmp_Ui);
-  (void)__builtin_ia32_xsetbv(tmp_Ui, tmp_ULLi);
   (void)__builtin_ia32_xrstor(tmp_vp, tmp_ULLi);
   (void)__builtin_ia32_xrstor64(tmp_vp, tmp_ULLi);
   (void)__builtin_ia32_xsaveopt(tmp_vp, tmp_ULLi);

Modified: cfe/trunk/test/CodeGen/x86_32-xsave.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/x86_32-xsave.c?rev=278814&r1=278813&r2=278814&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/x86_32-xsave.c (original)
+++ cfe/trunk/test/CodeGen/x86_32-xsave.c Tue Aug 16 11:04:14 2016
@@ -1,9 +1,6 @@
 // RUN: %clang_cc1 %s -DTEST_XSAVE -O0 -triple=i686-unknown-unknown -target-feature +xsave -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefix=XSAVE
 // RUN: %clang_cc1 %s -DTEST_XSAVE -O0 -triple=i686-unknown-unknown -target-feature +xsave -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefix=XSAVE
 
-// RUN: %clang_cc1 %s -DTEST_XGETBV -O0 -triple=i686-unknown-unknown -target-feature +xsave -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefix=XGETBV
-// RUN: %clang_cc1 %s -DTEST_XSETBV -O0 -triple=i686-unknown-unknown -target-feature +xsave -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefix=XSETBV
-
 // RUN: %clang_cc1 %s -DTEST_XSAVEOPT -O0 -triple=i686-unknown-unknown -target-feature +xsave -target-feature +xsaveopt -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefix=XSAVEOPT
 // RUN: %clang_cc1 %s -DTEST_XSAVEOPT -O0 -triple=i686-unknown-unknown -target-feature +xsave -target-feature +xsaveopt -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefix=XSAVEOPT
 
@@ -13,15 +10,9 @@
 // RUN: %clang_cc1 %s -DTEST_XSAVES -O0 -triple=i686-unknown-unknown -target-feature +xsave -target-feature +xsaves -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefix=XSAVES
 // RUN: %clang_cc1 %s -DTEST_XSAVES -O0 -triple=i686-unknown-unknown -target-feature +xsave -target-feature +xsaves -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefix=XSAVES
 
-// Don't include mm_malloc.h, it's system specific.
-#define __MM_MALLOC_H
-#include <x86intrin.h>
-
 void test() {
-  unsigned long long tmp_ULLi;
-  unsigned int       tmp_Ui;
-  void*              tmp_vp;
-  tmp_ULLi = 0; tmp_Ui = 0; tmp_vp = 0;
+  unsigned long long tmp_ULLi = 0;
+  void*              tmp_vp = 0;
 
 #ifdef TEST_XSAVE
 // XSAVE: [[tmp_vp_1:%[0-9a-zA-z]+]] = load i8*, i8** %tmp_vp, align 4
@@ -39,12 +30,6 @@ void test() {
 // XSAVE: [[low32_3:%[0-9a-zA-z]+]] = trunc i64 [[tmp_ULLi_3]] to i32
 // XSAVE: call void @llvm.x86.xrstor(i8* [[tmp_vp_3]], i32 [[high32_3]], i32 [[low32_3]])
   (void)__builtin_ia32_xrstor(tmp_vp, tmp_ULLi);
-  
-// XSAVE: call void @llvm.x86.xsave
-  (void)_xsave(tmp_vp, tmp_ULLi);
-  
-// XSAVE: call void @llvm.x86.xrstor
-  (void)_xrstor(tmp_vp, tmp_ULLi);
 #endif
 
 #ifdef TEST_XSAVEOPT
@@ -55,9 +40,6 @@ void test() {
 // XSAVEOPT: [[low32_1:%[0-9a-zA-z]+]] = trunc i64 [[tmp_ULLi_1]] to i32
 // XSAVEOPT: call void @llvm.x86.xsaveopt(i8* [[tmp_vp_1]], i32 [[high32_1]], i32 [[low32_1]])
   (void)__builtin_ia32_xsaveopt(tmp_vp, tmp_ULLi);
-  
-// XSAVEOPT: call void @llvm.x86.xsaveopt
-  (void)_xsaveopt(tmp_vp, tmp_ULLi);
 #endif
 
 #ifdef TEST_XSAVEC
@@ -68,9 +50,6 @@ void test() {
 // XSAVEC: [[low32_1:%[0-9a-zA-z]+]] = trunc i64 [[tmp_ULLi_1]] to i32
 // XSAVEC: call void @llvm.x86.xsavec(i8* [[tmp_vp_1]], i32 [[high32_1]], i32 [[low32_1]])
   (void)__builtin_ia32_xsavec(tmp_vp, tmp_ULLi);
- 
-// XSAVEC: call void @llvm.x86.xsavec 
-  (void)_xsavec(tmp_vp, tmp_ULLi);
 #endif
 
 #ifdef TEST_XSAVES
@@ -89,34 +68,5 @@ void test() {
 // XSAVES: [[low32_3:%[0-9a-zA-z]+]] = trunc i64 [[tmp_ULLi_3]] to i32
 // XSAVES: call void @llvm.x86.xrstors(i8* [[tmp_vp_3]], i32 [[high32_3]], i32 [[low32_3]])
   (void)__builtin_ia32_xrstors(tmp_vp, tmp_ULLi);
-  
-// XSAVES: call void @llvm.x86.xsaves
-  (void)_xsaves(tmp_vp, tmp_ULLi); 
-
-// XSAVES: call void @llvm.x86.xrstors
-  (void)_xrstors(tmp_vp, tmp_ULLi);
-#endif
-
-#ifdef TEST_XGETBV
-// XGETBV: [[tmp_Ui:%[0-9a-zA-z]+]] = load i32, i32* %tmp_Ui, align 4
-// XGETBV: call i64 @llvm.x86.xgetbv(i32 [[tmp_Ui]])
-  tmp_ULLi = __builtin_ia32_xgetbv(tmp_Ui);
-  
-// XGETBV: call i64 @llvm.x86.xgetbv
-  tmp_ULLi = _xgetbv(tmp_Ui);
-#endif
-
-#ifdef TEST_XSETBV
-// XSETBV: [[tmp_Ui:%[0-9a-zA-z]+]] = load i32, i32* %tmp_Ui, align 4
-// XSETBV: [[tmp_ULLi_3:%[0-9a-zA-z]+]] = load i64, i64* %tmp_ULLi, align 8
-// XSETBV: [[high64_3:%[0-9a-zA-z]+]] = lshr i64 [[tmp_ULLi_3]], 32
-// XSETBV: [[high32_3:%[0-9a-zA-z]+]] = trunc i64 [[high64_3]] to i32
-// XSETBV: [[low32_3:%[0-9a-zA-z]+]] = trunc i64 [[tmp_ULLi_3]] to i32
-// XSETBV: call void @llvm.x86.xsetbv(i32 [[tmp_Ui]], i32 [[high32_3]], i32 [[low32_3]])
-  (void)__builtin_ia32_xsetbv(tmp_Ui, tmp_ULLi);
-  
-  // XSETBV: call void @llvm.x86.xsetbv
-  (void)_xsetbv(tmp_Ui, tmp_ULLi);
 #endif
-
-}
\ No newline at end of file
+}

Modified: cfe/trunk/test/CodeGen/x86_64-xsave.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/x86_64-xsave.c?rev=278814&r1=278813&r2=278814&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/x86_64-xsave.c (original)
+++ cfe/trunk/test/CodeGen/x86_64-xsave.c Tue Aug 16 11:04:14 2016
@@ -1,9 +1,6 @@
 // RUN: %clang_cc1 %s -DTEST_XSAVE -O0 -triple=x86_64-unknown-unknown -target-feature +xsave -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefix=XSAVE
 // RUN: %clang_cc1 %s -DTEST_XSAVE -O0 -triple=x86_64-unknown-unknown -target-feature +xsave -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefix=XSAVE
 
-// RUN: %clang_cc1 %s -DTEST_XGETBV -O0 -triple=x86_64-unknown-unknown -target-feature +xsave -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefix=XGETBV
-// RUN: %clang_cc1 %s -DTEST_XSETBV -O0 -triple=x86_64-unknown-unknown -target-feature +xsave -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefix=XSETBV
-
 // RUN: %clang_cc1 %s -DTEST_XSAVEOPT -O0 -triple=x86_64-unknown-unknown -target-feature +xsave -target-feature +xsaveopt -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefix=XSAVEOPT
 // RUN: %clang_cc1 %s -DTEST_XSAVEOPT -O0 -triple=x86_64-unknown-unknown -target-feature +xsave -target-feature +xsaveopt -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefix=XSAVEOPT
 
@@ -13,16 +10,9 @@
 // RUN: %clang_cc1 %s -DTEST_XSAVES -O0 -triple=x86_64-unknown-unknown -target-feature +xsave -target-feature +xsaves -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefix=XSAVES
 // RUN: %clang_cc1 %s -DTEST_XSAVES -O0 -triple=x86_64-unknown-unknown -target-feature +xsave -target-feature +xsaves -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefix=XSAVES
 
-// Don't include mm_malloc.h, it's system specific.
-#define __MM_MALLOC_H
-#include <x86intrin.h>
-
-
 void test() {
-  unsigned long long tmp_ULLi;
-  unsigned int       tmp_Ui;
-  void*              tmp_vp;
-  tmp_ULLi = 0; tmp_Ui = 0; tmp_vp = 0;
+  unsigned long long tmp_ULLi = 0;
+  void*              tmp_vp = 0;
 
 #ifdef TEST_XSAVE
 // XSAVE: [[tmp_vp_1:%[0-9a-zA-z]+]] = load i8*, i8** %tmp_vp, align 8
@@ -56,18 +46,6 @@ void test() {
 // XSAVE: [[low32_4:%[0-9a-zA-z]+]] = trunc i64 [[tmp_ULLi_4]] to i32
 // XSAVE: call void @llvm.x86.xrstor64(i8* [[tmp_vp_4]], i32 [[high32_4]], i32 [[low32_4]])
   (void)__builtin_ia32_xrstor64(tmp_vp, tmp_ULLi);
-  
-// XSAVE: call void @llvm.x86.xsave
-  (void)_xsave(tmp_vp, tmp_ULLi);
-  
-// XSAVE: call void @llvm.x86.xsave64
-  (void)_xsave64(tmp_vp, tmp_ULLi);
-  
-// XSAVE: call void @llvm.x86.xrstor
-  (void)_xrstor(tmp_vp, tmp_ULLi);
-  
-// XSAVE: call void @llvm.x86.xrstor64
-  (void)_xrstor64(tmp_vp, tmp_ULLi);
 #endif
 
 #ifdef TEST_XSAVEOPT
@@ -86,12 +64,6 @@ void test() {
 // XSAVEOPT: [[low32_2:%[0-9a-zA-z]+]] = trunc i64 [[tmp_ULLi_2]] to i32
 // XSAVEOPT: call void @llvm.x86.xsaveopt64(i8* [[tmp_vp_2]], i32 [[high32_2]], i32 [[low32_2]])
   (void)__builtin_ia32_xsaveopt64(tmp_vp, tmp_ULLi);
-  
-// XSAVEOPT: call void @llvm.x86.xsaveopt
-  (void)_xsaveopt(tmp_vp, tmp_ULLi);
-  
-// XSAVEOPT: call void @llvm.x86.xsaveopt64
-  (void)_xsaveopt64(tmp_vp, tmp_ULLi);
 #endif
 
 #ifdef TEST_XSAVEC
@@ -110,12 +82,6 @@ void test() {
 // XSAVEC: [[low32_2:%[0-9a-zA-z]+]] = trunc i64 [[tmp_ULLi_2]] to i32
 // XSAVEC: call void @llvm.x86.xsavec64(i8* [[tmp_vp_2]], i32 [[high32_2]], i32 [[low32_2]])
   (void)__builtin_ia32_xsavec64(tmp_vp, tmp_ULLi);
-  
-// XSAVEC: call void @llvm.x86.xsavec 
-  (void)_xsavec(tmp_vp, tmp_ULLi);
-  
-// XSAVEC: call void @llvm.x86.xsavec64
-  (void)_xsavec64(tmp_vp, tmp_ULLi);
 #endif
 
 #ifdef TEST_XSAVES
@@ -150,39 +116,5 @@ void test() {
 // XSAVES: [[low32_4:%[0-9a-zA-z]+]] = trunc i64 [[tmp_ULLi_4]] to i32
 // XSAVES: call void @llvm.x86.xrstors64(i8* [[tmp_vp_4]], i32 [[high32_4]], i32 [[low32_4]])
   (void)__builtin_ia32_xrstors64(tmp_vp, tmp_ULLi);
-  
-// XSAVES: call void @llvm.x86.xsaves
-  (void)_xsaves(tmp_vp, tmp_ULLi); 
-  
-// XSAVES: call void @llvm.x86.xsaves64
-  (void)_xsaves64(tmp_vp, tmp_ULLi); 
-
-// XSAVES: call void @llvm.x86.xrstors
-  (void)_xrstors(tmp_vp, tmp_ULLi);
-  
-// XSAVES: call void @llvm.x86.xrstors64
-  (void)_xrstors64(tmp_vp, tmp_ULLi);
-#endif
-
-#ifdef TEST_XGETBV
-// XGETBV: [[tmp_Ui:%[0-9a-zA-z]+]] = load i32, i32* %tmp_Ui, align 4
-// XGETBV: call i64 @llvm.x86.xgetbv(i32 [[tmp_Ui]])
-  tmp_ULLi = __builtin_ia32_xgetbv(tmp_Ui);
-  
-// XGETBV: call i64 @llvm.x86.xgetbv
-  tmp_ULLi = _xgetbv(tmp_Ui);
-#endif
-
-#ifdef TEST_XSETBV
-// XSETBV: [[tmp_Ui:%[0-9a-zA-z]+]] = load i32, i32* %tmp_Ui, align 4
-// XSETBV: [[tmp_ULLi_3:%[0-9a-zA-z]+]] = load i64, i64* %tmp_ULLi, align 8
-// XSETBV: [[high64_3:%[0-9a-zA-z]+]] = lshr i64 [[tmp_ULLi_3]], 32
-// XSETBV: [[high32_3:%[0-9a-zA-z]+]] = trunc i64 [[high64_3]] to i32
-// XSETBV: [[low32_3:%[0-9a-zA-z]+]] = trunc i64 [[tmp_ULLi_3]] to i32
-// XSETBV: call void @llvm.x86.xsetbv(i32 [[tmp_Ui]], i32 [[high32_3]], i32 [[low32_3]])
-  (void)__builtin_ia32_xsetbv(tmp_Ui, tmp_ULLi);
-  
-  // XSETBV: call void @llvm.x86.xsetbv
-  (void)_xsetbv(tmp_Ui, tmp_ULLi);
 #endif
 }

Modified: cfe/trunk/test/Headers/ms-intrin.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Headers/ms-intrin.cpp?rev=278814&r1=278813&r2=278814&view=diff
==============================================================================
--- cfe/trunk/test/Headers/ms-intrin.cpp (original)
+++ cfe/trunk/test/Headers/ms-intrin.cpp Tue Aug 16 11:04:14 2016
@@ -50,6 +50,7 @@ void f() {
   int info[4];
   __cpuid(info, 0);
   __cpuidex(info, 0, 0);
+  _xgetbv(0);
   __halt();
   __readmsr(0);
 




More information about the cfe-commits mailing list