Skip to content

Conversation

@Lancern
Copy link
Member

@Lancern Lancern commented Jul 15, 2025

This patch backports changes made to the bit operations in the upstream PR llvm/llvm-project#148378. Namely, this patch includes the following changes:

  • This patch removes the bit. prefix in the op mnemonic. The operation names now directly correspond to the builtin function names except for bswap which is represented by cir.byte_swap for more clarity.
  • Since all bit operations are SameOperandsAndResultType, this patch updates their assembly format and avoids spelling out the operand type twice.

This patch backports changes made to the bit operations in the upstream. Namely,
this patch includes the following changes:

- This patch removes the `bit.` prefix in the op mnemonic. The operation names
  now directly correspond to the builtin function names except for bswap which
  is represented by `cir.byte_swap` for more clarity.
- Since all bit operations are `SameOperandsAndResultType`, this patch updates
  their assembly format and avoids spelling out the operand type twice.
@Lancern Lancern requested review from bcardosolopes and xlauko and removed request for bcardosolopes and lanza July 15, 2025 15:22
Copy link
Collaborator

@xlauko xlauko left a comment

Choose a reason for hiding this comment

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

lgtm

@Lancern Lancern merged commit fe8b9ca into llvm:main Jul 16, 2025
9 of 10 checks passed
@Lancern Lancern deleted the bits-op-backport branch July 16, 2025 12:57
terapines-osc-cir pushed a commit to Terapines/clangir that referenced this pull request Sep 2, 2025
This patch backports changes made to the bit operations in the upstream
PR llvm/llvm-project#148378. Namely, this patch includes the following
changes:

- This patch removes the `bit.` prefix in the op mnemonic. The operation
names now directly correspond to the builtin function names except for
bswap which is represented by `cir.byte_swap` for more clarity.
- Since all bit operations are `SameOperandsAndResultType`, this patch
updates their assembly format and avoids spelling out the operand type
twice.
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.

3 participants