Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cast from unsupported vector assertion from LegalizeDAG #1743

Closed
llvmbot opened this issue Apr 30, 2007 · 3 comments
Closed

Cast from unsupported vector assertion from LegalizeDAG #1743

llvmbot opened this issue Apr 30, 2007 · 3 comments
Assignees
Labels
bugzilla Issues migrated from bugzilla compile-fail Use [accepts-invalid] and [rejects-valid] instead llvm:codegen

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Apr 30, 2007

Bugzilla Link 1371
Resolution FIXED
Resolved on Feb 22, 2010 12:50
Version 1.8
OS Linux
Reporter LLVM Bugzilla Contributor

Extended Description

I get the following failure

llc: LegalizeDAG.cpp:5671:
llvm::SDOperand::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::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::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]

@llvmbot
Copy link
Collaborator Author

llvmbot commented Apr 30, 2007

assigned to @lattner

@lattner
Copy link
Collaborator

lattner commented May 5, 2007

Got it, I can finally repro with llc -mcpu=athlon-mp

@lattner
Copy link
Collaborator

lattner commented May 5, 2007

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

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
troelsbjerre pushed a commit to troelsbjerre/llvm-project that referenced this issue Jan 10, 2024
[IRGen] Fix an assert when __attribute__((used)) is used on an ObjC m…
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla compile-fail Use [accepts-invalid] and [rejects-valid] instead llvm:codegen
Projects
None yet
Development

No branches or pull requests

2 participants