Skip to content

Conversation

AnnuCode
Copy link
Contributor

Adding a new Op to handle operations involving !moore.string operands per the rules mentioned in IEEE Std 1800-2012 (page 108).
With the proposed code changes, when one operand is of !moore.string type and the other is a string literal, the string literal gets implicitly converted to !moore.string type for the comparison. Thus, all the scenarios are covered:

  • Both operands are of !moore.string type
  • One operand is of the !moore.string type, and the other is a string literal
  • Both operands are string literals (the operator is the same comparison operator as for integral types)

Screenshot 2025-04-26 043055

Copy link
Contributor

@fabianschuiki fabianschuiki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, thanks for adding this! 🥳

@fabianschuiki
Copy link
Contributor

Thanks a lot @AnnuCode! Going to land this now 👍

@fabianschuiki fabianschuiki merged commit 25b09ba into llvm:main May 1, 2025
5 checks passed
@AnnuCode
Copy link
Contributor Author

AnnuCode commented May 2, 2025

Thank you, @fabianschuiki! 🙂

TaoBi22 pushed a commit to TaoBi22/circt that referenced this pull request Jul 17, 2025
Add a new op to handle operations involving `!moore.string` operands per 
the rules mentioned in IEEE 1800-2012 table 6-9 "String operators".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants