<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 - opt fails with CGSCCPassManager.cpp:923: [...] Assertion `(E || !FunctionPass) [...]' failed."
   href="https://bugs.llvm.org/show_bug.cgi?id=51946">51946</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>opt fails with CGSCCPassManager.cpp:923: [...] Assertion `(E || !FunctionPass) [...]' failed.
          </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>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Interprocedural Optimizations
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>mikael.holmen@ericsson.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>bjorn.a.pettersson@ericsson.com, chandlerc@gmail.com, llvm-bugs@lists.llvm.org, mtrofin@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>bjorn.a.pettersson@ericsson.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>chandlerc@gmail.com, mtrofin@google.com
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>opt fails with CGSCCPassManager.cpp:923: [...] Assertion `(E || !FunctionPass) [...]' failed.
          </td>
        </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - opt fails with CGSCCPassManager.cpp:923: [...] Assertion `(E || !FunctionPass) [...]' failed."
   href="https://bugs.llvm.org/show_bug.cgi?id=51946#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - opt fails with CGSCCPassManager.cpp:923: [...] Assertion `(E || !FunctionPass) [...]' failed."
   href="https://bugs.llvm.org/show_bug.cgi?id=51946">bug 51946</a>
              from <span class="vcard"><a class="email" href="mailto:mikael.holmen@ericsson.com" title="Mikael Holmén <mikael.holmen@ericsson.com>"> <span class="fn">Mikael Holmén</span></a>
</span></b>
        <pre>I just realized the bbi-53898_2.ll reproducer does not result in the exact same
assert as the original reproducer but this one:

opt: ../lib/Analysis/CGSCCPassManager.cpp:959: auto
updateCGAndAnalysisManagerForPass(llvm::LazyCallGraph &, LazyCallGraph::SCC &,
LazyCallGraph::Node &, llvm::CGSCCAnalysisManager &, llvm::CGSCCUpdateResult &,
llvm::FunctionAnalysisManager &, bool)::(anonymous
class)::operator()(llvm::Function &) const: Assertion `(E || !FunctionPass) &&
"No function transformations should introduce *new* ref " "edges! Any new ref
edges would require IPO which " "function passes aren't allowed to do!"'
failed.

:(

Not sure if it's still likely to be the same problem or if I should create a
new PR for that?</pre>
        </div>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - opt fails with CGSCCPassManager.cpp:923: [...] Assertion `(E || !FunctionPass) [...]' failed."
   href="https://bugs.llvm.org/show_bug.cgi?id=51946#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - opt fails with CGSCCPassManager.cpp:923: [...] Assertion `(E || !FunctionPass) [...]' failed."
   href="https://bugs.llvm.org/show_bug.cgi?id=51946">bug 51946</a>
              from <span class="vcard"><a class="email" href="mailto:mikael.holmen@ericsson.com" title="Mikael Holmén <mikael.holmen@ericsson.com>"> <span class="fn">Mikael Holmén</span></a>
</span></b>
        <pre>Weird things happening. Both when I added the comment and attached the file I
got errors from bugzilla. I can see my comment though so the error didn't seem
that serious even if I have doubt whether email notifications where sent or
not.</pre>
        </div>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - opt fails with CGSCCPassManager.cpp:923: [...] Assertion `(E || !FunctionPass) [...]' failed."
   href="https://bugs.llvm.org/show_bug.cgi?id=51946#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - opt fails with CGSCCPassManager.cpp:923: [...] Assertion `(E || !FunctionPass) [...]' failed."
   href="https://bugs.llvm.org/show_bug.cgi?id=51946">bug 51946</a>
              from <span class="vcard"><a class="email" href="mailto:mikael.holmen@ericsson.com" title="Mikael Holmén <mikael.holmen@ericsson.com>"> <span class="fn">Mikael Holmén</span></a>
</span></b>
        <pre>Created <span class=""><a href="attachment.cgi?id=25327" name="attach_25327" title="bbi-53898_2.ll reproducer">attachment 25327</a> <a href="attachment.cgi?id=25327&action=edit" title="bbi-53898_2.ll reproducer">[details]</a></span>
bbi-53898_2.ll reproducer</pre>
        </div>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - opt fails with CGSCCPassManager.cpp:923: [...] Assertion `(E || !FunctionPass) [...]' failed."
   href="https://bugs.llvm.org/show_bug.cgi?id=51946#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - opt fails with CGSCCPassManager.cpp:923: [...] Assertion `(E || !FunctionPass) [...]' failed."
   href="https://bugs.llvm.org/show_bug.cgi?id=51946">bug 51946</a>
              from <span class="vcard"><a class="email" href="mailto:mikael.holmen@ericsson.com" title="Mikael Holmén <mikael.holmen@ericsson.com>"> <span class="fn">Mikael Holmén</span></a>
</span></b>
        <pre>The same assert can also be seen with:
 opt
-passes="cgscc(devirt<4>(inline)),function(slp-vectorizer),cgscc(devirt<4>(function(sroa)))"
-o /dev/null bbi-53898_2.ll -aa-pipeline=default

In this case it starts happening with commit 78d4096d037:
    [LazyCallGraph] Add invalidate method.

    Summary: Add invalidate method in LazyCallGraph.

    Reviewers: chandlerc, silvas

    Subscribers: hiraditya, sanjoy.google, llvm-commits

    Tags: #llvm

    Differential Revision: <a href="https://reviews.llvm.org/D72817">https://reviews.llvm.org/D72817</a>

In a later commit, 6699029b67b, -aa-pipeline=default was made the default, so
after that it can be reproduced with just
  opt
-passes="cgscc(devirt<4>(inline)),function(slp-vectorizer),cgscc(devirt<4>(function(sroa)))"
-o /dev/null bbi-53898_2.ll</pre>
        </div>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - opt fails with CGSCCPassManager.cpp:923: [...] Assertion `(E || !FunctionPass) [...]' failed."
   href="https://bugs.llvm.org/show_bug.cgi?id=51946#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - opt fails with CGSCCPassManager.cpp:923: [...] Assertion `(E || !FunctionPass) [...]' failed."
   href="https://bugs.llvm.org/show_bug.cgi?id=51946">bug 51946</a>
              from <span class="vcard"><a class="email" href="mailto:bjorn.a.pettersson@ericsson.com" title="bjorn.a.pettersson@ericsson.com">bjorn.a.pettersson@ericsson.com</a>
</span></b>
        <pre>The problem can also be seen with an even more reduced pipeline such as

  opt -passes='cgscc(no-op-cgscc),ipsccp,cgscc(function(sroa))' -o /dev/null
bbi-60603.ll</pre>
        </div>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=25284" name="attach_25284" title="bbi-60603.ll reproducer">attachment 25284</a> <a href="attachment.cgi?id=25284&action=edit" title="bbi-60603.ll reproducer">[details]</a></span>
bbi-60603.ll reproducer

llvm commit: e7b169a8ae99

Reproduce with:
 opt -passes='cgscc(require<fam-proxy>),ipsccp,scc-oz-module-inliner' -o
/dev/null bbi-60603.ll

Result:
opt: ../lib/Analysis/CGSCCPassManager.cpp:923: LazyCallGraph::SCC
&updateCGAndAnalysisManagerForPass(llvm::LazyCallGraph &, LazyCallGraph::SCC &,
LazyCallGraph::Node &, llvm::CGSCCAnalysisManager &, llvm::CGSCCUpdateResult &,
llvm::FunctionAnalysisManager &, bool): Assertion `(E || !FunctionPass) && "No
function transformations should introduce *new* " "call edges! Any new calls
should be modeled as " "promoted existing ref edges!"' failed.
PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash
backtrace.
Stack dump:
0.      Program arguments: ../../master-github/llvm/build-all/bin/opt
-passes=cgscc(require<fam-proxy>),ipsccp,scc-oz-module-inliner -o /dev/null
bbi-60603.ll
 #0 0x0000000002b4ed73 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(../../master-github/llvm/build-all/bin/opt+0x2b4ed73)
 #1 0x0000000002b4c9ee llvm::sys::RunSignalHandlers()
(../../master-github/llvm/build-all/bin/opt+0x2b4c9ee)
 #2 0x0000000002b4f0f6 SignalHandler(int) Signals.cpp:0:0
 #3 0x00007f94cc294630 __restore_rt sigaction.c:0:0
 #4 0x00007f94c99c7387 raise (/lib64/libc.so.6+0x36387)
 #5 0x00007f94c99c8a78 abort (/lib64/libc.so.6+0x37a78)
 #6 0x00007f94c99c01a6 __assert_fail_base (/lib64/libc.so.6+0x2f1a6)
 #7 0x00007f94c99c0252 (/lib64/libc.so.6+0x2f252)
 #8 0x0000000001a03af5 updateCGAndAnalysisManagerForPass(llvm::LazyCallGraph&,
llvm::LazyCallGraph::SCC&, llvm::LazyCallGraph::Node&,
llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&,
llvm::CGSCCUpdateResult&, llvm::AnalysisManager<llvm::Function>&, bool)
CGSCCPassManager.cpp:0:0
 #9 0x00000000019fec2d
llvm::CGSCCToFunctionPassAdaptor::run(llvm::LazyCallGraph::SCC&,
llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&,
llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&)
(../../master-github/llvm/build-all/bin/opt+0x19fec2d)
#10 0x0000000000ae7b1d llvm::detail::PassModel<llvm::LazyCallGraph::SCC,
llvm::CGSCCToFunctionPassAdaptor, llvm::PreservedAnalyses,
llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>,
llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&>::run(llvm::LazyCallGraph::SCC&,
llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&,
llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&) crtstuff.c:0:0
#11 0x00000000019f9168 llvm::PassManager<llvm::LazyCallGraph::SCC,
llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>,
llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&>::run(llvm::LazyCallGraph::SCC&,
llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&,
llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&)
(../../master-github/llvm/build-all/bin/opt+0x19f9168)
#12 0x000000000247432d llvm::detail::PassModel<llvm::LazyCallGraph::SCC,
llvm::PassManager<llvm::LazyCallGraph::SCC,
llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>,
llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&>, llvm::PreservedAnalyses,
llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>,
llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&>::run(llvm::LazyCallGraph::SCC&,
llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&,
llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&) crtstuff.c:0:0
#13 0x00000000019fce59
llvm::DevirtSCCRepeatedPass::run(llvm::LazyCallGraph::SCC&,
llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&,
llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&)
(../../master-github/llvm/build-all/bin/opt+0x19fce59)
#14 0x00000000024749fd llvm::detail::PassModel<llvm::LazyCallGraph::SCC,
llvm::DevirtSCCRepeatedPass, llvm::PreservedAnalyses,
llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>,
llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&>::run(llvm::LazyCallGraph::SCC&,
llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&,
llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&) crtstuff.c:0:0
#15 0x00000000019fb403
llvm::ModuleToPostOrderCGSCCPassAdaptor::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&)
(../../master-github/llvm/build-all/bin/opt+0x19fb403)
#16 0x00000000024747ad llvm::detail::PassModel<llvm::Module,
llvm::ModuleToPostOrderCGSCCPassAdaptor, llvm::PreservedAnalyses,
llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&) crtstuff.c:0:0
#17 0x0000000002305408 llvm::PassManager<llvm::Module,
llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&)
(../../master-github/llvm/build-all/bin/opt+0x2305408)
#18 0x00000000024703a9 llvm::ModuleInlinerWrapperPass::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&)
(../../master-github/llvm/build-all/bin/opt+0x24703a9)
#19 0x0000000002e2b6ed llvm::detail::PassModel<llvm::Module,
llvm::ModuleInlinerWrapperPass, llvm::PreservedAnalyses,
llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&) crtstuff.c:0:0
#20 0x0000000002305408 llvm::PassManager<llvm::Module,
llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&)
(../../master-github/llvm/build-all/bin/opt+0x2305408)
#21 0x000000000079b7ac llvm::runPassPipeline(llvm::StringRef, llvm::Module&,
llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*,
llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef,
llvm::ArrayRef<llvm::StringRef>, llvm::opt_tool::OutputKind,
llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool)
(../../master-github/llvm/build-all/bin/opt+0x79b7ac)
#22 0x00000000007aeb96 main
(../../master-github/llvm/build-all/bin/opt+0x7aeb96)
#23 0x00007f94c99b3555 __libc_start_main (/lib64/libc.so.6+0x22555)
#24 0x0000000000796bec _start
(../../master-github/llvm/build-all/bin/opt+0x796bec)
Abort</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>