[llvm] r180992 - Unbreaking the non-x86 build bots by protecting the AVX test code properly.

Aaron Ballman aaron at aaronballman.com
Thu May 2 19:52:21 PDT 2013


Author: aaronballman
Date: Thu May  2 21:52:21 2013
New Revision: 180992

URL: http://llvm.org/viewvc/llvm-project?rev=180992&view=rev
Log:
Unbreaking the non-x86 build bots by protecting the AVX test code properly.

Modified:
    llvm/trunk/lib/Target/X86/X86Subtarget.cpp

Modified: llvm/trunk/lib/Target/X86/X86Subtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Subtarget.cpp?rev=180992&r1=180991&r2=180992&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86Subtarget.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86Subtarget.cpp Thu May  2 21:52:21 2013
@@ -171,6 +171,7 @@ bool X86Subtarget::IsLegalToCallImmediat
 }
 
 static bool OSHasAVXSupport() {
+#if defined(i386) || defined(__i386__) || defined(__x86__) || defined(_M_IX86)
 #if defined(__GNUC__)
   // Check xgetbv; this uses a .byte sequence instead of the instruction
   // directly because older assemblers do not include support for xgetbv and
@@ -183,6 +184,9 @@ static bool OSHasAVXSupport() {
   int rEAX = 0; // Ensures we return false
 #endif
   return (rEAX & 6) == 6;
+#else
+  return false;
+#endif
 }
 
 void X86Subtarget::AutoDetectSubtargetFeatures() {





More information about the llvm-commits mailing list