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

crucible-llvm: Add integer-related llvm.vector.reduce.* intrinsics #1201

Merged
merged 2 commits into from
May 9, 2024

Conversation

RyanGlScott
Copy link
Contributor

This patch:

  • Adds the ability to register polymorphic LLVM overrides involving vector types. (Previously, the polymorphic LLVM machinery was able to handle overrides that vary over a single integer type, but they did not handle vector types with varying sizes.)
  • Adds polymorphic overrides for all of the integer-related llvm.vector.reduce.* intrinsics, which work over any vector or integer size.
  • Adds a T1177.c test case to the crux-llvm test suite which provides some assurance that the crucible-llvm semantics work as expected.

Fixes #1177.

This patch:

* Adds the ability to register polymorphic LLVM overrides involving vector
  types. (Previously, the polymorphic LLVM machinery was able to handle
  overrides that vary over a single integer type, but they did not handle
  vector types with varying sizes.)
* Adds polymorphic overrides for all of the integer-related
  `llvm.vector.reduce.*` intrinsics, which work over any vector or integer
  size.
* Adds a `T1177.c` test case to the `crux-llvm` test suite which provides
  some assurance that the `crucible-llvm` semantics work as expected.

Fixes #1177.
-> NatRepr intSz
-- ^ The size of the integer type.
-> LLVMOverride p sym ext
(EmptyCtx ::> VectorType (BVType intSz))
Copy link
Member

Choose a reason for hiding this comment

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

It may be useful in the future to create a VectorSizedType vecSz (BVType intSz) representation to correlate/constrain the arguments, but I don't think it's worth the impact to this PR.

@RyanGlScott RyanGlScott merged commit b0e3818 into master May 9, 2024
32 checks passed
@RyanGlScott RyanGlScott deleted the T1177-llvm.vector.reduce branch May 9, 2024 16:39
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.

crucible-llvm: Implement llvm.vector.reduce.* intrinsics (added in LLVM 12)
2 participants