Skip to content

Do not precompute RMW ops on GC types#8517

Merged
tlively merged 2 commits intomainfrom
precompute-gc-rmw
Mar 25, 2026
Merged

Do not precompute RMW ops on GC types#8517
tlively merged 2 commits intomainfrom
precompute-gc-rmw

Conversation

@tlively
Copy link
Member

@tlively tlively commented Mar 25, 2026

These operations have side effects and their results depend on the
current state of the heap, so they cannot be safely constant-folded
even if the current field value is known at compile time.

These operations have side effects and their results depend on the
current state of the heap, so they cannot be safely constant-folded
even if the current field value is known at compile time.
@tlively tlively requested a review from a team as a code owner March 25, 2026 00:47
@tlively tlively requested review from kripken and removed request for a team March 25, 2026 00:47
@@ -0,0 +1,83 @@
;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited.
;; RUN: wasm-opt %s --precompute --all-features -S -o - | filecheck %s
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps add a comment in the file about the expected results.

@tlively tlively changed the title Precompute: Do not constant fold atomic RMW/Cmpxchg on GC types Do not precompute RMW ops on GC types Mar 25, 2026
@tlively tlively enabled auto-merge (squash) March 25, 2026 15:55
@tlively tlively merged commit 10c876d into main Mar 25, 2026
16 checks passed
@tlively tlively deleted the precompute-gc-rmw branch March 25, 2026 16:25
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