This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add missing part of instruction vmsge {u}. VX
ClosedPublic

Authored by joker881 on Apr 8 2021, 8:28 AM.

Details

Summary


riscv-v-spec-0.10 page 59

The fourth case of instruction description is added

Diff Detail

Event Timeline

joker881 created this revision.Apr 8 2021, 8:28 AM
joker881 requested review of this revision.Apr 8 2021, 8:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 8 2021, 8:28 AM
lebedev.ri retitled this revision from Add missing part of instruction vmsge {u}. VX to [RISCV] Add missing part of instruction vmsge {u}. VX.Apr 8 2021, 9:32 AM

Upload patches with full context using git diff -U99999 as documented here https://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface

llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
2397

Please wrap this line as clang-format says.

2416

Please indent these comments as the clang-format says.

joker881 updated this revision to Diff 336313.Apr 8 2021, 10:02 PM

Do we need this case? Case 4 is any vd. It means (vd == v0) || (vd != v0), right? These two cases are already covered by case 2 and case 3.

Do we need this case? Case 4 is any vd. It means (vd == v0) || (vd != v0), right? These two cases are already covered by case 2 and case 3.

I think this is the case that a temp register is provided and the destination isn't v0. The user probably should use case 2 by not providing the temp register. But if they give the temp register should we accept it and match the spec or error for the destination not being v0(what we currently do)?

joker881 updated this revision to Diff 336325.Apr 9 2021, 12:12 AM

clang-format the code

joker881 updated this revision to Diff 336329.Apr 9 2021, 12:42 AM
joker881 updated this revision to Diff 336342.Apr 9 2021, 1:27 AM
joker881 marked 2 inline comments as done.

Do we need this case? Case 4 is any vd. It means (vd == v0) || (vd != v0), right? These two cases are already covered by case 2 and case 3.

I think this is the case that a temp register is provided and the destination isn't v0. The user probably should use case 2 by not providing the temp register. But if they give the temp register should we accept it and match the spec or error for the destination not being v0(what we currently do)?

If the destination is not v0, case 2 is better than case 4. There should be no need to provide the temp register. I think the case 4 is useful when we could not determine vd is v0 or not, but it should not be the case in AsmParser. The registers in MCInst should be physical registers.

joker881 updated this revision to Diff 336387.Apr 9 2021, 4:02 AM
joker881 marked 2 inline comments as not done.
joker881 updated this revision to Diff 336392.Apr 9 2021, 4:25 AM
joker881 marked 2 inline comments as done.
joker881 added a comment.EditedApr 9 2021, 4:59 AM

Upload patches with full context using git diff -U99999 as documented here https://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface

Ok, I have finished it. B97933: Diff 336392.

craig.topper added a comment.EditedApr 9 2021, 9:33 AM

Do we need this case? Case 4 is any vd. It means (vd == v0) || (vd != v0), right? These two cases are already covered by case 2 and case 3.

I think this is the case that a temp register is provided and the destination isn't v0. The user probably should use case 2 by not providing the temp register. But if they give the temp register should we accept it and match the spec or error for the destination not being v0(what we currently do)?

If the destination is not v0, case 2 is better than case 4. There should be no need to provide the temp register. I think the case 4 is useful when we could not determine vd is v0 or not, but it should not be the case in AsmParser. The registers in MCInst should be physical registers.

What does the GNU assembler do?

Can someone write inline assembly that requires this? If they let the compiler allocate the registers for the inline assembly we would need to support any register.

Do we need this case? Case 4 is any vd. It means (vd == v0) || (vd != v0), right? These two cases are already covered by case 2 and case 3.

I think this is the case that a temp register is provided and the destination isn't v0. The user probably should use case 2 by not providing the temp register. But if they give the temp register should we accept it and match the spec or error for the destination not being v0(what we currently do)?

If the destination is not v0, case 2 is better than case 4. There should be no need to provide the temp register. I think the case 4 is useful when we could not determine vd is v0 or not, but it should not be the case in AsmParser. The registers in MCInst should be physical registers.

What does the GNU assembler do?

Can someone write inline assembly that requires this? If they let the compiler allocate the registers for the inline assembly we would need to support any register.

Got it. Maybe we need this pattern for inline asm. I have no strong opinion to oppose this patch. Just curious when we need it.

This revision is now accepted and ready to land.Apr 12 2021, 10:09 AM
MaskRay closed this revision.EditedApr 13 2021, 4:25 PM

Your commit description was not formatted correctly. You can read other commits for references.
Please use proper author name and email instead of root <calico>.

Differential Revision: was not on a new line so the differential was not automatically closed when you pushed the commit.