[AMDGPU][True16][CodeGen] true16 codegen pattern for v_med3_u/i16 (#121850)
[llvm-project.git] / llvm / test / MC / WebAssembly / type-checker-emit-after-unreachable.s
blob806901d01dce772167b573e4f2383d2cb1b12f55
1 # We had a regression where an else instruction would be omitted if it followed
2 # return (i.e. it was in an unreachable state).
3 # See: https://github.com/llvm/llvm-project/issues/56935
5 # RUN: llvm-mc -triple=wasm32-unknown-unknown < %s | FileCheck %s
7 foo:
8 .functype foo () -> (i32)
9 i32.const 1
10 if i32
11 i32.const 2
12 return
13 else
14 i32.const 3
15 end_if
16 end_function
18 # CHECK-LABEL: foo:
19 # CHECK-NEXT: .functype foo () -> (i32)
20 # CHECK-NEXT: i32.const 1
21 # CHECK-NEXT: if i32
22 # CHECK-NEXT: i32.const 2
23 # CHECK-NEXT: return
24 # CHECK-NEXT: else
25 # CHECK-NEXT: i32.const 3
26 # CHECK-NEXT: end_if
27 # CHECK-NEXT: end_function