LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 1371 - Cast from unsupported vector assertion from LegalizeDAG
Summary: Cast from unsupported vector assertion from LegalizeDAG
Status: RESOLVED FIXED
Alias: None
Product: libraries
Classification: Unclassified
Component: Common Code Generator Code (show other bugs)
Version: 1.8
Hardware: PC Linux
: P normal
Assignee: Chris Lattner
URL:
Keywords: compile-fail
Depends on:
Blocks:
 
Reported: 2007-04-29 22:46 PDT by Scott McMurray
Modified: 2010-02-22 12:50 PST (History)
1 user (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Scott McMurray 2007-04-29 22:46:34 PDT
I get the following failure

llc: LegalizeDAG.cpp:5671:
llvm::SDOperand<unnamed>::SelectionDAGLegalize::PackVectorOp(llvm::SDOperand,
llvm::MVT::ValueType): Assertion `0 && "Cast from unsupported vector type not
implemented yet!"' failed.

from both CodeGen/Generic/vector.ll and CodeGen/X86/2006-10-13-CycleInDAG.ll


Full output:

Running /home/me22/programming/llvm-cvs/test/CodeGen/Generic/dg.exp ...
FAIL: /home/me22/programming/llvm-cvs/test/CodeGen/Generic/vector.ll
Failed with signal(SIGABRT) at line 1
while running: llvm-upgrade <
/home/me22/programming/llvm-cvs/test/CodeGen/Generic/vector.ll | llvm-as | llc


.text
        .align  16
        .globl  test_f1
        .type test_f1,@function
test_f1:
        movl 4(%esp), %eax
        flds (%eax)
        movl 8(%esp), %eax
        fadds (%eax)
        movl 12(%esp), %eax
        fstps (%eax)
        #FP_REG_KILL
        ret
        .size test_f1, .-test_f1


        .align  16
        .globl  test_f2
        .type test_f2,@function
test_f2:
        movl 4(%esp), %eax
        flds 4(%eax)
        movl 8(%esp), %ecx
        fadds 4(%ecx)
        flds (%eax)
        fadds (%ecx)
        movl 12(%esp), %eax
        fxch %st(1)
        fstps 4(%eax)
        fstps (%eax)
        #FP_REG_KILL
        ret
        .size test_f2, .-test_f2


        .align  16
        .globl  test_f4
        .type test_f4,@function
test_f4:
        movl 4(%esp), %eax
        movaps (%eax), %xmm0
        movl 8(%esp), %eax
        addps (%eax), %xmm0
        movl 12(%esp), %eax
        movaps %xmm0, (%eax)
        ret
        .size test_f4, .-test_f4


        .align  16
        .globl  test_f8
        .type test_f8,@function
test_f8:
        movl 4(%esp), %eax
        movaps 16(%eax), %xmm0
        movl 8(%esp), %ecx
        addps 16(%ecx), %xmm0
        movaps (%eax), %xmm1
        addps (%ecx), %xmm1
        movl 12(%esp), %eax
        movaps %xmm0, 16(%eax)
        movaps %xmm1, (%eax)
        ret
        .size test_f8, .-test_f8


        .align  16
        .globl  test_fmul
        .type test_fmul,@function
test_fmul:
        movl 4(%esp), %eax
        movaps 16(%eax), %xmm0
        movl 8(%esp), %ecx
        mulps 16(%ecx), %xmm0
        movaps (%eax), %xmm1
        mulps (%ecx), %xmm1
        movl 12(%esp), %eax
        movaps %xmm0, 16(%eax)
        movaps %xmm1, (%eax)
        ret
        .size test_fmul, .-test_fmul


        .align  16
        .globl  test_div
        .type test_div,@function
test_div:
        movl 4(%esp), %eax
        movaps 16(%eax), %xmm0
        movl 8(%esp), %ecx
        divps 16(%ecx), %xmm0
        movaps (%eax), %xmm1
        divps (%ecx), %xmm1
        movl 12(%esp), %eax
        movaps %xmm0, 16(%eax)
        movaps %xmm1, (%eax)
        ret
        .size test_div, .-test_div


        .align  16
        .globl  test_cst
        .type test_cst,@function
test_cst:
        subl $76, %esp
        movl $1073741824, 32(%esp)
        movl $1036831949, 48(%esp)
        movl $1083179008, (%esp)
        movl $1065353216, 16(%esp)
        movaps 16(%esp), %xmm0
        unpcklps (%esp), %xmm0
        movaps 48(%esp), %xmm1
        unpcklps 32(%esp), %xmm1
        unpcklps %xmm0, %xmm1
        movl 80(%esp), %eax
        addps (%eax), %xmm1
        movl 84(%esp), %eax
        movaps %xmm1, (%eax)
        addl $76, %esp
        ret
        .size test_cst, .-test_cst


        .align  16
        .globl  test_zero
        .type test_zero,@function
test_zero:
        xorps %xmm0, %xmm0
        movl 4(%esp), %eax
        addps (%eax), %xmm0
        movl 8(%esp), %eax
        movaps %xmm0, (%eax)
        ret
        .size test_zero, .-test_zero


        .align  16
        .globl  test_undef
        .type test_undef,@function
test_undef:
        #IMPLICIT_DEF %xmm0
        movl 8(%esp), %eax
        movaps %xmm0, (%eax)
        ret
        .size test_undef, .-test_undef


        .align  16
        .globl  test_constant_insert
        .type test_constant_insert,@function
test_constant_insert:
        subl $28, %esp
        movl $1092616192, (%esp)
        xorps %xmm0, %xmm0
        movaps (%esp), %xmm1
        movss %xmm1, %xmm0
        movl 32(%esp), %eax
        movaps %xmm0, (%eax)
        addl $28, %esp
        ret
        .size test_constant_insert, .-test_constant_insert


        .align  16
        .globl  test_variable_buildvector
        .type test_variable_buildvector,@function
test_variable_buildvector:
        subl $28, %esp
        fldl 32(%esp)
        fstps 24(%esp)
        flds 24(%esp)
        fstps (%esp)
        xorps %xmm0, %xmm0
        movaps (%esp), %xmm1
        movss %xmm1, %xmm0
        movl 40(%esp), %eax
        movaps %xmm0, (%eax)
        #FP_REG_KILL
        addl $28, %esp
        ret
        .size test_variable_buildvector, .-test_variable_buildvector


        .align  16
        .globl  test_scalar_to_vector
        .type test_scalar_to_vector,@function
test_scalar_to_vector:
        subl $28, %esp
        fldl 32(%esp)
        fstps 24(%esp)
        flds 24(%esp)
        fstps (%esp)
        movl 40(%esp), %eax
        movaps (%esp), %xmm0
        movaps %xmm0, (%eax)
        #FP_REG_KILL
        addl $28, %esp
        ret
        .size test_scalar_to_vector, .-test_scalar_to_vector


        .align  16
        .globl  test_extract_elt
        .type test_extract_elt,@function
test_extract_elt:
        subl $28, %esp
        movl 32(%esp), %eax
        movaps (%eax), %xmm0
        movaps %xmm0, (%esp)
        flds 12(%esp)
        #FP_REG_KILL
        addl $28, %esp
        ret
        .size test_extract_elt, .-test_extract_elt


        .align  16
        .globl  test_extract_elt2
        .type test_extract_elt2,@function
test_extract_elt2:
        movl 4(%esp), %eax
        fldl 24(%eax)
        #FP_REG_KILL
        ret
        .size test_extract_elt2, .-test_extract_elt2
llc: LegalizeDAG.cpp:5671:
llvm::SDOperand<unnamed>::SelectionDAGLegalize::PackVectorOp(llvm::SDOperand,
llvm::MVT::ValueType): Assertion `0 && "Cast from unsupported vector type not
implemented yet!"' failed.
llc((anonymous namespace)::PrintStackTrace()+0x1a)[0x84e573a]
/lib/libc.so.6(abort+0xfe)[0x401adc8e]
/lib/libc.so.6(__assert_fail+0xfb)[0x401a5dcb]
llc[0x82ece74]

Running /home/me22/programming/llvm-cvs/test/CodeGen/X86/dg.exp ...
FAIL: /home/me22/programming/llvm-cvs/test/CodeGen/X86/2006-10-13-CycleInDAG.ll
Failed with signal(SIGABRT) at line 1
while running: llvm-upgrade <
/home/me22/programming/llvm-cvs/test/CodeGen/X86/2006-10-13-CycleInDAG.ll |
llvm-as | llc -march=x86
llc: LegalizeDAG.cpp:5671:
llvm::SDOperand<unnamed>::SelectionDAGLegalize::PackVectorOp(llvm::SDOperand,
llvm::MVT::ValueType): Assertion `0 && "Cast from unsupported vector type not
implemented yet!"' failed.
llc((anonymous namespace)::PrintStackTrace()+0x1a)[0x84e573a]
/lib/libc.so.6(abort+0xfe)[0x401adc8e]
/lib/libc.so.6(__assert_fail+0xfb)[0x401a5dcb]
llc[0x82ece74]
Comment 1 Chris Lattner 2007-05-05 14:04:28 PDT
Got it, I can finally repro with llc -mcpu=athlon-mp
Comment 2 Chris Lattner 2007-05-05 14:40:02 PDT
Fixed.  Patch here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070430/049157.html

Testcase here: CodeGen/X86/2007-05-05-VecCastExpand.ll

Thanks!

-Chris