<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 - New assertion failure `MustInsert.second && "New discriminator shouldn't be present in set"' (X86DiscriminateMemOps.cpp)"
   href="https://bugs.llvm.org/show_bug.cgi?id=39890">39890</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>New assertion failure `MustInsert.second && "New discriminator shouldn't be present in set"' (X86DiscriminateMemOps.cpp)
          </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>Windows NT
          </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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>greg.bedwell@sony.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>davidxl@google.com, htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, wmi@google.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Bisected on our internal fork to r347938 (Revert "Revert r347596 "Support for
inserting profile-directed cache prefetches") but reproducible with upstream
TOT (r348340) as follows:

$ cat 1.cpp
# define B4 b; b; b; b
# define B16 B4; B4; B4; B4
# define B64 B16; B16; B16; B16
# define B256 B64; B64; B64; B64
# define B1024 B256; B256; B256; B256

void a() {
          volatile int b;
            B1024; B1024; B;
}

$ ./bin/clang 1.cpp -c --target=x86_64-unknown-unknown -g
-fdebug-info-for-profiling -DB=
$ ./bin/clang 1.cpp -c --target=x86_64-unknown-unknown -g
-fdebug-info-for-profiling -DB=b
clang-8:
/mnt/e/work/public-git/llvm-project/llvm/lib/Target/X86/X86DiscriminateMemOps.cpp:119:
virtual bool
{anonymous}::X86DiscriminateMemOps::runOnMachineFunction(llvm::MachineFunction&):
Assertion `MustInsert.second && "New discriminator shouldn't be present in
set"' failed.


Obviously the above is quite a contrived testcase but we've seen it happen in
real code where there is heavy use of nested macro expansions.</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>