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

            Bug ID: 30929
           Summary: LibCallsShrinkWrap falsely claims to preserve CFG
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: opt
          Assignee: unassignedb...@nondot.org
          Reporter: jesper.antons...@ericsson.com
                CC: llvm-bugs@lists.llvm.org
    Classification: Unclassified

We get multiple different fails in our randomized testing using the
LibCallsShrinkWrap pass. The problem is that this pass claims to preserve the
CFG, but it actually doesn't, which (at least) gives problems with the domtree.

The problem can be replicated with this tiny program:

define void @TEST__MAIN() {
  %_tmp31 = call float @acosf(float 2.000000e+00)
  ret void
}
declare float @acosf(float)

It fails in gvn using the following opt call:

 opt -instcombine -libcalls-shrinkwrap -gvn ./shrink.ll

Failing assert:

opt: ../include/llvm/Support/GenericDomTree.h:591: void
llvm::DominatorTreeBase<llvm::BasicBlock>::changeImmediateDominator(DomTreeNodeBase<NodeT>
*, DomTreeNodeBase<NodeT> *) [N = llvm::BasicBlock]: Assertion `N && NewIDom &&
"Cannot change null node pointers!"' failed.

One can also insert a -verify-dom-info after the -libcalls-shrinkwrap option,
and that will report the problem as well:
DominatorTree for function: TEST__MAIN is not up to date!

-- 
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