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

           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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to