Skip to content

Work around an LLVM bug in widening casts of loads in wasm#8981

Merged
abadams merged 3 commits intomainfrom
abadams/fix_8928
Mar 5, 2026
Merged

Work around an LLVM bug in widening casts of loads in wasm#8981
abadams merged 3 commits intomainfrom
abadams/fix_8928

Conversation

@abadams
Copy link
Member

@abadams abadams commented Mar 4, 2026

Fixes #8928

Pulls in the optimization_fence helper from #8925

abadams and others added 2 commits March 4, 2026 12:03
Fixes #8928

Pulls in the optimization_fence helper from #8925

Co-authored-by: Claude Code <noreply@anthropic.com>
@abadams
Copy link
Member Author

abadams commented Mar 4, 2026

LLVM bug filed as llvm/llvm-project#184676

// insert a freeze node between the load and the extend, causing a
// cast<LoadSDNode> assertion failure. Use an optimization fence to
// prevent the DAG combiner from seeing through to the load. See
// https://github.com/halide/Halide/issues/8928
Copy link
Member

Choose a reason for hiding this comment

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

Can you also put a reference to the LLVM issue here?

Copy link
Member

@alexreinking alexreinking left a comment

Choose a reason for hiding this comment

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

LGTM with nit

@abadams abadams merged commit d9b1c26 into main Mar 5, 2026
15 of 17 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.

Fuzz error: correctness/lossless_cast

2 participants