https://bugs.llvm.org/show_bug.cgi?id=39890

            Bug ID: 39890
           Summary: New assertion failure `MustInsert.second && "New
                    discriminator shouldn't be present in set"'
                    (X86DiscriminateMemOps.cpp)
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedb...@nondot.org
          Reporter: greg.bedw...@sony.com
                CC: davi...@google.com, htmldevelo...@gmail.com,
                    llvm-bugs@lists.llvm.org, w...@google.com

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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to