[LLVMbugs] [Bug 14996] New: ConstantFoldInsertValueInstruction crashes when folding vectors

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jan 18 15:08:34 PST 2013


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

             Bug #: 14996
           Summary: ConstantFoldInsertValueInstruction crashes when
                    folding vectors
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Core LLVM classes
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: dg at cowlark.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


llvm::ConstantFoldInsertValueInstruction contains the following code:

  if (StructType *ST = dyn_cast<StructType>(Agg->getType()))
    NumElts = ST->getNumElements();
  else if (ArrayType *AT = dyn_cast<ArrayType>(Agg->getType()))
    NumElts = AT->getNumElements();
  else
    NumElts = AT->getVectorNumElements();

Unfortunately if Agg is a VectorType, then the last code path gets executed,
except AT is NULL...

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