summaryrefslogtreecommitdiff
path: root/src/ir/effects.h
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2024-12-17 14:30:46 -0800
committerGitHub <noreply@github.com>2024-12-17 14:30:46 -0800
commit9f5f8dd2ffe0b89ea071aea3d2b3efad42dada4f (patch)
tree8c3631b4d4126ca6ac33d38cbd68619d05188a35 /src/ir/effects.h
parentc93009422574e54797736ce4b346804943a14d32 (diff)
downloadbinaryen-9f5f8dd2ffe0b89ea071aea3d2b3efad42dada4f.tar.gz
binaryen-9f5f8dd2ffe0b89ea071aea3d2b3efad42dada4f.tar.bz2
binaryen-9f5f8dd2ffe0b89ea071aea3d2b3efad42dada4f.zip
RemoveUnusedBrs: Avoid an error on loops with unreachable ifs (#7156)
We normally like to move brs after ifs into the if, when in a loop: (loop $loop (if .. (unreachable) (code) ) (br $loop) ) => (loop $loop (if .. (unreachable) (block (code) (br $loop) ;; moved in ) ) ) However this may be invalid to do if the if condition is unreachable, as then one arm may be concrete (`code` in the example could be an `i32`, for example). As this is dead code anyhow, leave it for DCE.
Diffstat (limited to 'src/ir/effects.h')
0 files changed, 0 insertions, 0 deletions