[llvm-commits] CVS: llvm/tools/bugpoint/Miscompilation.cpp

Chris Lattner lattner at cs.uiuc.edu
Fri Jan 14 16:07:34 PST 2005



Changes in directory llvm/tools/bugpoint:

Miscompilation.cpp updated: 1.58 -> 1.59
---
Log message:

Improve output precision.


---
Diffs of the changes:  (+12 -2)

Index: llvm/tools/bugpoint/Miscompilation.cpp
diff -u llvm/tools/bugpoint/Miscompilation.cpp:1.58 llvm/tools/bugpoint/Miscompilation.cpp:1.59
--- llvm/tools/bugpoint/Miscompilation.cpp:1.58	Thu Dec 16 17:04:20 2004
+++ llvm/tools/bugpoint/Miscompilation.cpp	Fri Jan 14 18:07:19 2005
@@ -25,6 +25,7 @@
 #include "llvm/Transforms/Utils/Cloning.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/FileUtilities.h"
+#include "llvm/Config/config.h"   // for HAVE_LINK_R
 using namespace llvm;
 
 namespace llvm {
@@ -65,6 +66,11 @@
   // Check to see if the finished program matches the reference output...
   if (BD.diffProgram(BytecodeResult, "", true /*delete bytecode*/)) {
     std::cout << " nope.\n";
+    if (Suffix.empty()) {
+      std::cerr << BD.getToolName() << ": I'm confused: the test fails when "
+                << "no passes are run, nondeterministic program?\n";
+      exit(1);
+    }
     return KeepSuffix;         // Miscompilation detected!
   }
   std::cout << " yup.\n";      // No miscompilation!
@@ -817,9 +823,13 @@
   if (isExecutingJIT()) {
     std::cout << "  lli -load " << SharedObject << " " << TestModuleBC;
   } else {
-    std::cout << "  llc " << TestModuleBC << " -o " << TestModuleBC << ".s\n";
+    std::cout << "  llc -f " << TestModuleBC << " -o " << TestModuleBC<< ".s\n";
     std::cout << "  gcc " << SharedObject << " " << TestModuleBC
-              << ".s -o " << TestModuleBC << ".exe -Wl,-R.\n";
+              << ".s -o " << TestModuleBC << ".exe";
+#if defined (HAVE_LINK_R)
+    std::cout << "-Wl,-R.";
+#endif
+    std::cout << "\n";
     std::cout << "  " << TestModuleBC << ".exe";
   }
   for (unsigned i=0, e = InputArgv.size(); i != e; ++i)






More information about the llvm-commits mailing list