[LLVMbugs] [Bug 17219] New: crash in LegalizeTypes

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Sep 12 17:05:12 PDT 2013


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

            Bug ID: 17219
           Summary: crash in LegalizeTypes
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: nlewycky at google.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Testcase from "suer" on #llvm:

@glob = global i8 1
@blob = global <2 x i1> <i1 1, i1 0>
@str = internal constant [19 x i8] c"Hello, world! (%d)\00"
declare i32 @printf(i8*, i8)
define i32 @main()
{
  %blobld = load <2 x i1>* @blob
  %vec = select <2 x i1> %blobld, <2 x i2> <i2 1, i2 2>, <2 x i2> <i2 3, i2 0>
  %simp = bitcast <2 x i2> %vec to i4
  %byte = zext i4 %simp to i8
  store i8 %byte, i8* @glob

  %ld = load i8* @glob
  call i32 @printf( i8* getelementptr ([19 x i8]* @str, i32 0,i32 0), i8 %ld)
  ret i32 0
}

Crash:

nlewycky at ducttape:~$ llvm/Debug+Asserts/bin/llc suer.ll
llc:
/usr/local/google/home/nlewycky/llvm/include/llvm/CodeGen/ValueTypes.h:730:
llvm::MVT llvm::EVT::getSimpleVT() const: Assertion `isSimple() && "Expected a
SimpleValueType!"' failed.

#5  0x00000000010cbdfd in (anonymous namespace)::VectorLegalizer::LegalizeOp (
    this=0x7fffffffcd10, Op=...) at LegalizeVectorOps.cpp:168
168           switch (TLI.getTruncStoreAction(ValVT, StVT.getSimpleVT())) {
(gdb) p ValVT
$1 = {SimpleTy = llvm::MVT::v2i64}
(gdb) p StVT 
$2 = {V = {SimpleTy = llvm::MVT::INVALID_SIMPLE_VALUE_TYPE}, 
  LLVMTy = 0x2704110}
(gdb) p StVT.LLVMTy->dump()
<2 x i2>$3 = void

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130913/4f01ef05/attachment.html>


More information about the llvm-bugs mailing list