Skip to content

Conversation

@Scheremo
Copy link
Contributor

  • Added ClassUpcastOpConversion lowering:

    • Converts moore.class.upcast to a direct value forward when both source and
      destination are LLVM opaque pointers (!llvm.ptr).
    • Emits a diagnostic if applied to non-opaque pointer types.
  • Registered the new pattern in populateOpConversion alongside other class
    conversion patterns.

@Scheremo Scheremo force-pushed the pr-moore-classes-upcastop-lowering branch from 800ef7e to 69a48d7 Compare October 29, 2025 14:24
@Scheremo Scheremo changed the title [MooreToCore] [3/3] Add support for lowering moore.class.upcast [MooreToCore] [3/4] Add support for lowering moore.class.upcast Oct 29, 2025
@Scheremo Scheremo force-pushed the pr-moore-classes-upcastop-lowering branch 6 times, most recently from c5edc36 to 98ce8db Compare October 31, 2025 08:43
@Scheremo Scheremo marked this pull request as ready for review October 31, 2025 09:17
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.

LGTM! Just a minor nit on making the test less brittle by not covering moore.class.new.

@Scheremo Scheremo force-pushed the pr-moore-classes-upcastop-lowering branch 3 times, most recently from 5f24814 to c6fbc04 Compare November 2, 2025 13:00
- Added `ClassUpcastOpConversion` lowering:
  - Converts `moore.class.upcast` to a direct value forward when both source and
    destination are LLVM opaque pointers (`!llvm.ptr`).
  - Emits a diagnostic if applied to non-opaque pointer types.

- Registered the new pattern in `populateOpConversion` alongside other class
  conversion patterns.
@Scheremo Scheremo force-pushed the pr-moore-classes-upcastop-lowering branch from c6fbc04 to dea68e5 Compare November 2, 2025 13:40
@Scheremo Scheremo merged commit 8ec3279 into llvm:main Nov 2, 2025
7 checks passed
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