[LLVMbugs] [Bug 4664] New: instcombine generates invalid constant operands

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Jul 31 13:33:32 PDT 2009


           Summary: instcombine generates invalid constant operands
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: kevin.fan at gmail.com
                CC: llvmbugs at cs.uiuc.edu

Created an attachment (id=3270)
 --> (http://llvm.org/bugs/attachment.cgi?id=3270)
input bitcode file

Instcombine generates invalid constant operands in the presence of certain
sext/trunc instructions.

To reproduce:

$ opt -inline -instcombine bug.bc -f -o out.bc

Observe that the disassembly file out.ll contains bogus constants, for example:
   %0 = malloc [3758096388 x i8*]

In addition, if you try to run llc on the output:

$ llc out.bc
llc: /home/kevin/llvm/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:872:
llvm::SDValue llvm::SelectionDAG::getConstant(uint64_t, llvm::MVT, bool):
Assertion `(EltVT.getSizeInBits() >= 64 || (uint64_t)((int64_t)Val >>
EltVT.getSizeInBits()) + 1 < 2) && "getConstant with a uint64_t value that
doesn't fit in the type!"' failed.

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