This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Add DFP conversion instructions definitions and MC tests
ClosedPublic

Authored by lei on Jul 3 2023, 3:43 PM.

Details

Summary

Add td definitions and asm/disasm tests for the quantum conversion
instructions in ISA 3.1 section 5.6.5

Diff Detail

Event Timeline

lei created this revision.Jul 3 2023, 3:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 3 2023, 3:43 PM
lei requested review of this revision.Jul 3 2023, 3:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 3 2023, 3:43 PM
lei updated this revision to Diff 536938.Jul 3 2023, 7:56 PM

fix indentation.

lei updated this revision to Diff 537073.Jul 4 2023, 6:00 AM

clang-format

Mostly looks good just a handful of comments.

llvm/lib/Target/PowerPC/PPCInstrDFP.td
32

I feel like this should still be FRTB like the parent class.

71

nit:
The ins here should be (ins f8rc:$FRB).

81

I don't know if it's easier but you can do something like:

let XX = 1 in {
  def DCTFIXQQ: XForm_FRTB5<63, 994, (outs vrrc:$FRT), (ins fpairrc:$FRB),
                            "dctfixqq $FRT, $FRB", [], IIC_FPGeneral>;
} // XX = 1

And then you don't need the extra class at all. I'm not sure if that's easier / clearer in this situation.

lei updated this revision to Diff 537149.Jul 4 2023, 12:07 PM

remove new class def as there's an existing one.

lei updated this revision to Diff 537153.Jul 4 2023, 12:20 PM

address review comments

lei updated this revision to Diff 537159.Jul 4 2023, 12:44 PM

rebase to ToT

lei updated this revision to Diff 537184.Jul 4 2023, 3:20 PM

update description

stefanp accepted this revision.Jul 5 2023, 4:19 AM

Thank you for adding these instructions!
LGTM

This revision is now accepted and ready to land.Jul 5 2023, 4:19 AM
amyk added a comment.Jul 11 2023, 10:27 AM

Just a comment regarding indentation but otherwise I think LGTM, too.

llvm/lib/Target/PowerPC/PPCInstrDFP.td
61

Could we fix the indentation on the second lines of each instruction definition?

lei updated this revision to Diff 539614.Jul 12 2023, 9:53 AM
lei marked an inline comment as done.

fix indentation.

This revision was landed with ongoing or failed builds.Jul 12 2023, 10:57 AM
This revision was automatically updated to reflect the committed changes.