bjorn3 commented on Issue #2261:
It already says that it will initialize it to zero. The comment talks about the fact that this only should happen in unreachable code and as such doesn't have any effect.
zhiqiangxu commented on Issue #2261:
Why does it say it's unreachable?
For example, in the following IR,
v3 = iconst.i32 0
can be generated silently, and is reachable:block0: v3 = iconst.i32 0 v1 -> v3 v2 = iconst.i32 0 v0 -> v2 call fn0(v1, v0, v1) return v1
bjorn3 commented on Issue #2261:
I mean that it should only happen during codegen of code in the source language (for example wasm) that is unreachable. In all other cases the user is expected to define a variable before using it.
zhiqiangxu commented on Issue #2261:
Ah you mean it's unreachable in the source language, not in the clif IR, thanks for the clarification!
Last updated: Nov 22 2024 at 17:03 UTC