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

matching inline asm constraints with memory not implemented #1505

Closed
llvmbot opened this issue Jan 26, 2007 · 14 comments
Closed

matching inline asm constraints with memory not implemented #1505

llvmbot opened this issue Jan 26, 2007 · 14 comments
Labels
backend:X86 bugzilla Issues migrated from bugzilla compile-fail Use [accepts-invalid] and [rejects-valid] instead

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Jan 26, 2007

Bugzilla Link 1133
Resolution FIXED
Resolved on Feb 20, 2008 23:28
Version trunk
OS Linux
Blocks #1234
Attachments bugpoint reduction
Reporter LLVM Bugzilla Contributor
CC @efriedma-quic

Extended Description

the attched reduction is from code that passes regular gcc.

llc: SelectionDAGISel.cpp:2622: void
llvm::SelectionDAGLowering::visitInlineAsm(llvm::CallInst&): Assertion `(NumOps
& 7) == 2 && "Skipped past definitions?"' failed.

@lattner
Copy link
Collaborator

lattner commented Jun 5, 2007

*** Bug llvm/llvm-bugzilla-archive#1490 has been marked as a duplicate of this bug. ***

@lattner
Copy link
Collaborator

lattner commented Sep 11, 2007

*** Bug llvm/llvm-bugzilla-archive#1640 has been marked as a duplicate of this bug. ***

@efriedma-quic
Copy link
Collaborator

Probably not that useful to comment, but I just ran into this attempting to compile ffmpeg.

@lattner
Copy link
Collaborator

lattner commented Feb 11, 2008

Eli, can you include the C source for the inline asm expression that causes the problem?

@efriedma-quic
Copy link
Collaborator

code from ffmpeg
Okay, here's the preprocessed source of the relevant function. It's in the file dsputil_mmx_avg.h in ffmpeg/libavcodec.

@efriedma-quic
Copy link
Collaborator

Filed Bug 2019... we can work out what's going on with this testcase there.

@lattner
Copy link
Collaborator

lattner commented Feb 20, 2008

Reduced testcase here:

int pixels;
int h;

void test() {
__asm __volatile(" %0 %1 %2 %3"
:"+imr"(h), "+S"(pixels)
: :"eax", "memory");
}
void test2() {
__asm __volatile(
" %0 %1 %2 %3"
:"+r"(h), "+S"(pixels)
: :"eax", "memory");
}

llvm-gcc rejects the former, but is fine with the later.

@efriedma-quic
Copy link
Collaborator

Hmm, so it is actually this bug... I guess that makes bug 2019 a clang bug.

@efriedma-quic
Copy link
Collaborator

Patch
As far as I can tell, this fix is correct. Of course, this should be reviewed by someone familiar with the relevant code.

@lattner
Copy link
Collaborator

lattner commented Feb 21, 2008

Your patch looks great to me, applied:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080218/058625.html

Thanks Eli!

@lattner
Copy link
Collaborator

lattner commented Nov 26, 2021

mentioned in issue llvm/llvm-bugzilla-archive#1490

@lattner
Copy link
Collaborator

lattner commented Nov 26, 2021

mentioned in issue llvm/llvm-bugzilla-archive#1640

@ggreif
Copy link
Contributor

ggreif commented Nov 26, 2021

mentioned in issue llvm/llvm-bugzilla-archive#1682

@asl
Copy link
Collaborator

asl commented Nov 27, 2021

mentioned in issue #1234

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:X86 bugzilla Issues migrated from bugzilla compile-fail Use [accepts-invalid] and [rejects-valid] instead
Projects
None yet
Development

No branches or pull requests

5 participants