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

Kuperstein, Michael M michael.m.kuperstein at intel.com
Mon May 6 23:15:38 PDT 2013


Hi Aaron,

This breaks AVX detection 64-bit platforms.
I can add "|| defined(__x86_64__) || defined(_M_AMD64) || defined (_M_X64)" (this is what Hosts.cpp has), but I just want to make sure this is an omission and not a conscious decision first.

Michael

-----Original Message-----
From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Aaron Ballman
Sent: Friday, May 03, 2013 05:52
To: llvm-commits at cs.uiuc.edu
Subject: [llvm] r180992 - Unbreaking the non-x86 build bots by protecting the AVX test code properly.

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() {


_______________________________________________
llvm-commits mailing list
llvm-commits at cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.





More information about the llvm-commits mailing list