<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 - Assertion "DELETED_NODE in CSEMap!" fires a lot with -march=skx"
   href="https://bugs.llvm.org/show_bug.cgi?id=32515">32515</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion "DELETED_NODE in CSEMap!" fires a lot with -march=skx
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

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

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

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>GlobalISel
          </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=18216" name="attach_18216" title="reproducer">attachment 18216</a> <a href="attachment.cgi?id=18216&action=edit" title="reproducer">[details]</a></span>
reproducer

<span class="quote">> cat f.cpp</span >
extern unsigned long long int var_8;
extern unsigned short var_26;
struct struct_1 {
    unsigned short member_1_1;
};
extern struct_1 struct_obj_2;
void foo() {
  if (struct_obj_2.member_1_1 == 0) {
    short a(var_26 != 7);
    bool b((1 & var_26) << var_8 & var_26 != 7);
  }
}

<span class="quote">> clang++ -std=c++11 -w -O0 -march=skx -c f.cpp</span >
clang-5.0:
/home/dybaboki/llvm/llvm-trunk-20170331/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:746:
bool llvm::SelectionDAG::RemoveNodeFromCSEMaps(llvm::SDNode *): Assertion
`N->getOpcode() != ISD::DELETED_
NODE && "DELETED_NODE in CSEMap!"' failed.
#0 0x0000000001263c3f llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/dybaboki/llvm/bin-trunk-20170331/bin/clang-5.0+0x1263c3f)
#1 0x0000000001263f46 SignalHandler(int)
(/home/dybaboki/llvm/bin-trunk-20170331/bin/clang-5.0+0x1263f46)
#2 0x00007fb20a413370 __restore_rt (/lib64/libpthread.so.0+0xf370)
#3 0x00007fb208f901d7 __GI_raise (/lib64/libc.so.6+0x351d7)
#4 0x00007fb208f918c8 __GI_abort (/lib64/libc.so.6+0x368c8)
#5 0x00007fb208f89146 __assert_fail_base (/lib64/libc.so.6+0x2e146)
#6 0x00007fb208f891f2 (/lib64/libc.so.6+0x2e1f2)
#7 0x0000000001954e43 llvm::SelectionDAG::RemoveNodeFromCSEMaps(llvm::SDNode*)
(/home/dybaboki/llvm/bin-trunk-20170331/bin/clang-5.0+0x1954e43)
#8 0x000000000195515f llvm::SelectionDAG::DeleteNode(llvm::SDNode*)
(/home/dybaboki/llvm/bin-trunk-20170331/bin/clang-5.0+0x195515f)
#9 0x000000000186cabb (anonymous
namespace)::DAGCombiner::CombineTo(llvm::SDNode*, llvm::SDValue const*,
unsigned int, bool)
(/home/dybaboki/llvm/bin-trunk-20170331/bin/clang-5.0+0x186cabb)
#10 0x00000000018a4910 (anonymous
namespace)::DAGCombiner::visitZERO_EXTEND(llvm::SDNode*)
(/home/dybaboki/llvm/bin-trunk-20170331/bin/clang-5.0+0x18a4910)
#11 0x00000000018744d6 (anonymous namespace)::DAGCombiner::visit(llvm::SDNode*)
(/home/dybaboki/llvm/bin-trunk-20170331/bin/clang-5.0+0x18744d6)
#12 0x000000000186edec (anonymous
namespace)::DAGCombiner::combine(llvm::SDNode*)
(/home/dybaboki/llvm/bin-trunk-20170331/bin/clang-5.0+0x186edec)
#13 0x000000000186db28 llvm::SelectionDAG::Combine(llvm::CombineLevel,
llvm::AAResults&, llvm::CodeGenOpt::Level)
(/home/dybaboki/llvm/bin-trunk-20170331/bin/clang-5.0+0x186db28)
<...>

I see quite a lot of fails like this one.

There's also <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - clang crashes on valid code at -O1 and above on x86_64-linux-gnu: Assertion `N->getOpcode() != ISD::DELETED_NODE && "DELETED_NODE in CSEMap!"' failed"
   href="show_bug.cgi?id=27747">bug 27747</a> mentioning this assertion, but it contains test case
which doesn't fail anymore.</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>