Index: lib/Target/X86/X86TargetMachine.cpp
===================================================================
RCS file: /var/cvs/llvm/llvm/lib/Target/X86/X86TargetMachine.cpp,v
retrieving revision 1.113
diff -u -r1.113 X86TargetMachine.cpp
--- lib/Target/X86/X86TargetMachine.cpp	3 May 2006 01:29:57 -0000	1.113
+++ lib/Target/X86/X86TargetMachine.cpp	9 May 2006 02:41:32 -0000
@@ -55,9 +55,11 @@
       TT[4] == '-' && TT[1] - '3' < 6)
     return 20;
 
-  if (M.getEndianness()  == Module::LittleEndian &&
+  if ((M.getEndianness()  == Module::LittleEndian &&
       M.getPointerSize() == Module::Pointer32)
-    return 10;                                   // Weak match
+      || (TT.size() >= 7 && TT[0] == 'x' && TT[1] == '8' && TT[2] == '6' && TT[3] == '_'
+          && TT[4] == '6' && TT[5] == '4' && TT[6] == '-'))
+    return 10;                                   // Weak match or x86_64-*
   else if (M.getEndianness() != Module::AnyEndianness ||
            M.getPointerSize() != Module::AnyPointerSize)
     return 0;                                    // Match for some other target
