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

[AMDGPU][MC][GFX11] v_dot2_f16_f16 and v_dot2_bf16_bf16 do not accept SGPRs for src operands #56861

Closed
dpreobra opened this issue Aug 1, 2022 · 4 comments
Assignees
Labels
backend:AMDGPU mc Machine (object) code

Comments

@dpreobra
Copy link
Collaborator

dpreobra commented Aug 1, 2022

These instructions do not accept SGPRs for src operands.

An example of failed test:

v_dot2_bf16_bf16 v5, s1, v2, v3

Expected result:

0x05,0x00,0x67,0xd6,0x01,0x04,0x0e,0x04

Actual output:

error: invalid operand for instruction

I'm not sure if this is a bug, but SP3 seems to accept SGPRs for src operands.

Added @Sisyph for awareness.

@dpreobra dpreobra added backend:AMDGPU mc Machine (object) code labels Aug 1, 2022
@llvmbot
Copy link
Collaborator

llvmbot commented Aug 1, 2022

@llvm/issue-subscribers-backend-amdgpu

@Sisyph
Copy link
Contributor

Sisyph commented Aug 1, 2022

This is a bug, both instructions should take SGPRs. We have llvm.amdgcn.fdot2.f16.f16.ll codegen test which is emitting an SGPR. It looks like the src operand types are correct but the modifier types are wrong, so the ParserMethod and PredicateMethod are getting things wrong.

@dpreobra dpreobra self-assigned this Aug 1, 2022
@dpreobra
Copy link
Collaborator Author

dpreobra commented Aug 1, 2022

Thanks, I see.

@dpreobra
Copy link
Collaborator Author

Closed by commit 05b3aad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:AMDGPU mc Machine (object) code
Projects
None yet
Development

No branches or pull requests

3 participants