Skip to content

[AVX] encoding issue with roundss instruction? #11212

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

Closed
llvmbot opened this issue Sep 2, 2011 · 4 comments
Closed

[AVX] encoding issue with roundss instruction? #11212

llvmbot opened this issue Sep 2, 2011 · 4 comments
Labels
bugzilla Issues migrated from bugzilla

Comments

@llvmbot
Copy link
Member

llvmbot commented Sep 2, 2011

Bugzilla Link 10840
Resolution FIXED
Resolved on Sep 26, 2011 00:32
Version unspecified
OS All
Blocks llvm/llvm-bugzilla-archive#10988
Attachments test case
Reporter LLVM Bugzilla Contributor
CC @d0k,@topperc

Extended Description

If I run llvm-objdump -disassemble on the object file generated by running the attached test case through llc -filetype=obj, I get errors about invalid instruction encoding.

Specifically, if I run "llc -mattr=+avx bug.ll -o -", there is this instruction sequence toward the end:

vmulss	LCPI0_1(%rip), %xmm1, %xmm2
vroundss	$9, %xmm2, %xmm2, %xmm2
vcvttss2si	%xmm2, %edx
andl	$3, %edx

However, if I run "llc -mattr=+avx -filetype=obj bug.ll -o - | llvm-objdump - -disassemble", then the output for the corresponding part is:

 160:	c5 f2 59 15 bc 00 00 00                      	vmulss	188(%rip), %xmm1, %xmm2

llvm-objdump: warning: invalid instruction encoding
16c: d2 09 rorb %cl, (%rcx)
16e: c5 fa 2c d2 vcvttss2si %xmm2, %edx
172: 83 e2 03 andl $3, %edx

So either the wrong encoding is being generated when making object files, or llvm-objdump doesn't know about this instruction. (I hope it's the former, since I'm seeing crashes when running the generated code. :-) ).

@llvmbot
Copy link
Member Author

llvmbot commented Sep 3, 2011

For what it's worth, Agner Fogg's disassembler reports that that vroundss is encoded as expected, so that suggests this is a bug in llvm-objdump, not in the output from the AVX backend.

(I'll spend some time today spinning up on the AVX encodings to confirm this from the ISA spec as well.)

@bcardosolopes
Copy link
Member

This is an assembler bug, CCing more people that may be willing to solve that!

@topperc
Copy link
Collaborator

topperc commented Sep 26, 2011

This seems to be working now.

@bcardosolopes
Copy link
Member

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

@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
bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

3 participants