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

Reply via email to