The CBE generates code which violates the TBAA rules of C, thus we must disable
authorChris Lattner <sabre@nondot.org>
Mon, 18 Aug 2003 22:32:03 +0000 (22:32 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 18 Aug 2003 22:32:03 +0000 (22:32 +0000)
optimizations based on these rules.  :(

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7964 91177308-0d34-0410-b5e6-96231b3b80d8

tools/bugpoint/ExecutionDriver.cpp

index 6a62233f92c3fcb44c6782077e767e1f0fb0f657..a9803f29e42658ccd5da09656ab02ed53746d241 100644 (file)
@@ -168,7 +168,13 @@ int GCC::ExecuteProgram(const std::string &ProgramFile,
   if (!SharedLib.empty()) // Specify the shared library to link in...
     GCCArgs.push_back(SharedLib.c_str());
   GCCArgs.push_back("-x");
-  GCCArgs.push_back((fileType == AsmFile) ? "assembler" : "c");
+  if (fileType == CFile) {
+    GCCArgs.push_back("c");
+    GCCArgs.push_back("-fno-strict-aliasing");
+  } else {
+    GCCArgs.push_back("assembler");
+  }
+
   GCCArgs.push_back(ProgramFile.c_str());  // Specify the input filename...
   GCCArgs.push_back("-o");
   GCCArgs.push_back(OutputBinary.c_str()); // Output to the right file...