[LLVMbugs] [Bug 18600] New: [InstCombine] assert "Value::replaceAllUsesWith(<null>) is invalid!"

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jan 24 06:09:35 PST 2014


http://llvm.org/bugs/show_bug.cgi?id=18600

            Bug ID: 18600
           Summary: [InstCombine] assert
                    "Value::replaceAllUsesWith(<null>) is invalid!"
           Product: libraries
           Version: 3.3
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: jfonseca at vmware.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 11930
  --> http://llvm.org/bugs/attachment.cgi?id=11930&action=edit
bugpoint-reduced-simplified.ll

$ gdb --args ~/work/vmware/llvm/llvm/build/linux-x86_64/Debug+Asserts/bin/opt
bugpoint-reduced-simplified.ll -instcombine -disable-output
(gdb) r
Starting program:
/home/jfonseca/work/vmware/llvm/llvm/build/linux-x86_64/Debug+Asserts/bin/opt
bugpoint-reduced-simplified.ll -instcombine -disable-output
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
opt: /home/jfonseca/work/vmware/llvm/llvm/lib/IR/Value.cpp:304: void
llvm::Value::replaceAllUsesWith(llvm::Value*): Assertion `New &&
"Value::replaceAllUsesWith(<null>) is invalid!"' failed.

Program received signal SIGABRT, Aborted.
0x00007ffff6e09f77 in __GI_raise (sig=sig at entry=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:56
56    ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007ffff6e09f77 in __GI_raise (sig=sig at entry=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff6e0d5e8 in __GI_abort () at abort.c:90
#2  0x00007ffff6e02d43 in __assert_fail_base (fmt=0x7ffff6f59f58 "%s%s%s:%u:
%s%sAssertion `%s' failed.\n%n", 
    assertion=assertion at entry=0x1388e80 "New &&
\"Value::replaceAllUsesWith(<null>) is invalid!\"", 
    file=file at entry=0x13886c0
"/home/jfonseca/work/vmware/llvm/llvm/lib/IR/Value.cpp", line=line at entry=304, 
    function=function at entry=0x138ae00
<llvm::Value::replaceAllUsesWith(llvm::Value*)::__PRETTY_FUNCTION__> "void
llvm::Value::replaceAllUsesWith(llvm::Value*)") at assert.c:92
#3  0x00007ffff6e02df2 in __GI___assert_fail (assertion=0x1388e80 "New &&
\"Value::replaceAllUsesWith(<null>) is invalid!\"", 
    file=0x13886c0 "/home/jfonseca/work/vmware/llvm/llvm/lib/IR/Value.cpp",
line=304, 
    function=0x138ae00
<llvm::Value::replaceAllUsesWith(llvm::Value*)::__PRETTY_FUNCTION__> "void
llvm::Value::replaceAllUsesWith(llvm::Value*)")
    at assert.c:101
#4  0x0000000000ed99ab in llvm::Value::replaceAllUsesWith
(this=this at entry=0x1772590, New=New at entry=0x0)
    at /home/jfonseca/work/vmware/llvm/llvm/lib/IR/Value.cpp:304
#5  0x0000000000aef2dc in llvm::InstCombiner::ReplaceInstUsesWith
(this=<optimised out>, I=..., V=0x0)
    at
/home/jfonseca/work/vmware/llvm/llvm/lib/Transforms/InstCombine/InstCombine.h:278
#6  0x0000000000b4ddf0 in llvm::InstCombiner::visitExtractElementInst
(this=0x1782370, EI=...)
    at
/home/jfonseca/work/vmware/llvm/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp:180
#7  0x0000000000aecd64 in llvm::InstCombiner::DoOneIteration
(this=this at entry=0x1782370, F=..., Iteration=Iteration at entry=0)
    at
/home/jfonseca/work/vmware/llvm/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:2427
#8  0x0000000000aed958 in llvm::InstCombiner::runOnFunction (this=0x1782370,
F=...)
    at
/home/jfonseca/work/vmware/llvm/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:2525
#9  0x0000000000ebdf0c in llvm::FPPassManager::runOnFunction
(this=this at entry=0x1789090, F=...)
    at /home/jfonseca/work/vmware/llvm/llvm/lib/IR/LegacyPassManager.cpp:1538
#10 0x0000000000ebe35b in llvm::FPPassManager::runOnModule (this=0x1789090,
M=...) at
/home/jfonseca/work/vmware/llvm/llvm/lib/IR/LegacyPassManager.cpp:1558
#11 0x0000000000ebe6a3 in runOnModule (M=..., this=<optimised out>) at
/home/jfonseca/work/vmware/llvm/llvm/lib/IR/LegacyPassManager.cpp:1616
#12 llvm::legacy::PassManagerImpl::run (this=0x176c400, M=...) at
/home/jfonseca/work/vmware/llvm/llvm/lib/IR/LegacyPassManager.cpp:1711
#13 0x0000000000ebe8ce in llvm::legacy::PassManager::run
(this=this at entry=0x7fffffffd950, M=...)
    at /home/jfonseca/work/vmware/llvm/llvm/lib/IR/LegacyPassManager.cpp:1746
#14 0x000000000052bb63 in main (argc=<optimised out>, argv=0x7fffffffdbc8) at
/home/jfonseca/work/vmware/llvm/llvm/tools/opt/opt.cpp:853
(gdb) 

This happens with all versions between LLVM 3.1 and LLVM 3.4

More the the actual crash, what I find surprising is that the complex constants
expression is not being folded automatically as it its being built.  This IR
was generated by the C bindings, inside llvmpipe Mesa driver.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140124/b816c38a/attachment.html>


More information about the llvm-bugs mailing list