[LLVMbugs] [Bug 2097] New: crash in Transforms/Scalar/CodeGenPrepare.cpp:993 on sparc

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Feb 26 07:36:38 PST 2008


           Summary: crash in Transforms/Scalar/CodeGenPrepare.cpp:993 on
           Product: libraries
           Version: trunk
          Platform: Sun
               URL: http://llvm.org/viewvc/llvm-
        OS/Version: Solaris
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Backend: SparcV8
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: ggreif at gmail.com
                CC: llvmbugs at cs.uiuc.edu

llc crashes on this test:


Reproducible as:

cd Debug/bin
llvm-upgrade < .../CodeGen/PowerPC/2006-12-07-LargeAlloca.ll | llvm-as > ggg.bc
llc -march=sparc -f ggg.bc

Here is the gdb session:

GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris"...
(gdb) b .../llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp:993
Breakpoint 1 at 0xa4285c: file CodeGenPrepare.cpp, line 993.
(gdb) run -march=sparc -f ../../Release/bin/ggg.bc
Starting program: .../llvm/Debug/bin/llc -march=sparc -f
warning: Temporarily disabling breakpoints for unloaded shared library
warning: Lowest section in /lib/libpthread.so.1 is .dynamic at 00000074

Breakpoint 1, (anonymous namespace)::CodeGenPrepare::OptimizeExtUses
    I=0xd34f98) at CodeGenPrepare.cpp:993
993       if (!TLI->isTruncateFree(I->getType(), Src->getType()))
(gdb) p TLI
$1 = (const class llvm::TargetLowering *) 0x0
(gdb) p *this
$2 = {<llvm::FunctionPass> = {<llvm::Pass> = {_vptr.Pass = 0xcebd78, 
      Resolver = 0xd31a90, PassID = 13815488, 
      AnalysisImpls = {<std::_Vector_base<std::pair<const llvm::PassInfo*,
llvm::Pass*>,std::allocator<std::pair<const llvm::PassInfo*, llvm::Pass*> > >>
= {
          _M_impl = {<std::allocator<std::pair<const llvm::PassInfo*,
llvm::Pass*> >> = {<__gnu_cxx::new_allocator<std::pair<const llvm::PassInfo*,
llvm::Pass*> >> = {<No data fields>}, <No data fields>}, _M_start = 0x0,
_M_finish = 0x0, 
            _M_end_of_storage = 0x0}}, <No data fields>}}, <No data fields>}, 
  TLI = 0x0, static ID = 0 '\0'}
(gdb) p I
$3 = (class llvm::Instruction *) 0xd34f98
(gdb) p Src
$4 = (class llvm::Value *) 0xd2e738
(gdb) p *Src
$5 = {_vptr.Value = 0xd073c8, SubclassID = 58, SubclassData = 0, Ty = {Ty =
  UseList = 0xd34fc0, Name = 0xd31dc0}
(gdb) call I->dump()
        %gep.upgrd.1 = zext i32 %iv. to i64             ; <i64> [#uses=1]

(gdb) call Src->dump()
        %iv. = phi i32 [ %iv..inc, %bb12.i ], [ 0, %bb19.bb12.i_crit_edge ]    
       ; <i32> [#uses=2]

        %iv. = phi i32 [ %iv..inc, %bb12.i ], [ 0, %bb19.bb12.i_crit_edge ]    
       ; <i32> [#uses=2]

Obviously the TLI object pointer is not correctly set, or in case NULL is
admissible, it should be checked for.

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list