<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - NewGVN indeterministic crash"
   href="https://bugs.llvm.org/show_bug.cgi?id=35583">35583</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>NewGVN indeterministic crash
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>babokin@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=19532" name="attach_19532" title="reproducer">attachment 19532</a> <a href="attachment.cgi?id=19532&action=edit" title="reproducer">[details]</a></span>
reproducer

clang trunk, rev 320132, x86_64.

The test case fails approximately one time out of 10. So I've haven't reduced
it. It may be easier to debug original test cases, than to reduce it.

<span class="quote">> clang++  -std=c++11 -w -O3 -g -mllvm -enable-newgvn -o func.o -c func.i</span >
clang-6.0:
/localdisk2/users/dybaboki/llvm/llvm-trunk-20171207/lib/Transforms/Scalar/NewGVN.cpp:3285:
void (anonymous namespace)::NewGVN::verifyIterationSettled(llvm::Function &):
Assertion `BeforeCC->isEquivalentTo(AfterCC) && "Value number changed after
main loop completed!"' failed.
#0 0x00000000013d24bf llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/localdisk2/users/dybaboki/llvm/bin-trunk-20171207/bin/clang-6.0+0x13d24bf)
#1 0x00000000013d27c6 SignalHandler(int)
(/localdisk2/users/dybaboki/llvm/bin-trunk-20171207/bin/clang-6.0+0x13d27c6)
#2 0x00007fd1665ef5e0 __restore_rt (/lib64/libpthread.so.0+0xf5e0)
#3 0x00007fd1651691f7 __GI_raise (/lib64/libc.so.6+0x351f7)
#4 0x00007fd16516a8e8 __GI_abort (/lib64/libc.so.6+0x368e8)
#5 0x00007fd165162266 __assert_fail_base (/lib64/libc.so.6+0x2e266)
#6 0x00007fd165162312 (/lib64/libc.so.6+0x2e312)
#7 0x00000000012c0147 (anonymous namespace)::NewGVN::runGVN()
(/localdisk2/users/dybaboki/llvm/bin-trunk-20171207/bin/clang-6.0+0x12c0147)
#8 0x00000000012c1d89 (anonymous
namespace)::NewGVNLegacyPass::runOnFunction(llvm::Function&)
(/localdisk2/users/dybaboki/llvm/bin-trunk-20171207/bin/clang-6.0+0x12c1d89)
#9 0x0000000000f3e3bf llvm::FPPassManager::runOnFunction(llvm::Function&)
(/localdisk2/users/dybaboki/llvm/bin-trunk-20171207/bin/clang-6.0+0xf3e3bf)
#10 0x0000000001def759 (anonymous
namespace)::CGPassManager::runOnModule(llvm::Module&)
(/localdisk2/users/dybaboki/llvm/bin-trunk-20171207/bin/clang-6.0+0x1def759)
#11 0x0000000000f3eb69 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/localdisk2/users/dybaboki/llvm/bin-trunk-20171207/bin/clang-6.0+0xf3eb69)
#12 0x000000000156511b clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout
const&, llvm::Module*, clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/localdisk2/users/dybaboki/llvm/bin-trunk-20171207/bin/clang-6.0+0x156511b)
#13 0x0000000001c66656
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/localdisk2/users/dybaboki/llvm/bin-trunk-20171207/bin/clang-6.0+0x1c66656)
#14 0x0000000002102d66 clang::ParseAST(clang::Sema&, bool, bool)
(/localdisk2/users/dybaboki/llvm/bin-trunk-20171207/bin/clang-6.0+0x2102d66)
#15 0x00000000019234d8 clang::FrontendAction::Execute()
(/localdisk2/users/dybaboki/llvm/bin-trunk-20171207/bin/clang-6.0+0x19234d8)
#16 0x00000000018e66e1
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/localdisk2/users/dybaboki/llvm/bin-trunk-20171207/bin/clang-6.0+0x18e66e1)
#17 0x00000000019ad978
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/localdisk2/users/dybaboki/llvm/bin-trunk-20171207/bin/clang-6.0+0x19ad978)
#18 0x00000000007a02e5 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*)
(/localdisk2/users/dybaboki/llvm/bin-trunk-20171207/bin/clang-6.0+0x7a02e5)
#19 0x000000000079e6bb main
(/localdisk2/users/dybaboki/llvm/bin-trunk-20171207/bin/clang-6.0+0x79e6bb)
#20 0x00007fd165155c05 __libc_start_main (/lib64/libc.so.6+0x21c05)
#21 0x000000000079bab2 _start
(/localdisk2/users/dybaboki/llvm/bin-trunk-20171207/bin/clang-6.0+0x79bab2)
Stack dump:
0.      Program arguments:
/localdisk2/users/dybaboki/llvm/bin-trunk-20171207/bin/clang-6.0 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name func.i
-mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-dwarf-column-info -debug-info-kind=limited -dwarf-version=4
-debugger-tuning=gdb -momit-leaf-frame-pointer -coverage-notes-file
/users/dybaboki/yarpgen/yarpgen/test_run_dev07/result/clang/compfail/S_12_2654392115/func.gcno
-resource-dir
/localdisk2/users/dybaboki/llvm/bin-trunk-20171207/lib/clang/6.0.0 -O3 -w
-std=c++11 -fdeprecated-macro -fdebug-compilation-dir
/users/dybaboki/yarpgen/yarpgen/test_run_dev07/result/clang/compfail/S_12_2654392115
-ferror-limit 19 -fmessage-length 272 -fobjc-runtime=gcc -fcxx-exceptions
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops
-vectorize-slp -mllvm -enable-newgvn -o func.o -x c++-cpp-output func.i
1.      <eof> parser at end of file
2.      Per-module optimization passes
3.      Running pass 'CallGraph Pass Manager' on module 'func.cpp'.
4.      Running pass 'Global Value Numbering' on function '@_Z8tf_0_foov'
clang-6.0: error: unable to execute command: Aborted (core dumped)
clang-6.0: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 6.0.0 (trunk 320132)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /users/dybaboki/llvm/bin-trunk-20171207/bin
clang-6.0: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and
associated run script.
clang-6.0: note: diagnostic msg: Error generating preprocessed source(s) - no
preprocessable inputs.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>