1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s | FileCheck %s
3 ; RUN: llc < %s -fast-isel -fast-isel-abort=1 | FileCheck %s --check-prefix=FAST
5 target triple = "wasm32-unknown-unknown"
7 define void @return_void() {
8 ; CHECK-LABEL: return_void:
9 ; CHECK: .functype return_void () -> ()
10 ; CHECK-NEXT: # %bb.0:
11 ; CHECK-NEXT: # fallthrough-return
13 ; FAST-LABEL: return_void:
14 ; FAST: .functype return_void () -> ()
16 ; FAST-NEXT: # fallthrough-return
20 define void @return_void_twice(i32 %a) {
21 ; CHECK-LABEL: return_void_twice:
22 ; CHECK: .functype return_void_twice (i32) -> ()
23 ; CHECK-NEXT: # %bb.0:
25 ; CHECK-NEXT: local.get 0
27 ; CHECK-NEXT: br_if 0 # 0: down to label0
28 ; CHECK-NEXT: # %bb.1: # %true
29 ; CHECK-NEXT: i32.const 0
30 ; CHECK-NEXT: i32.const 0
31 ; CHECK-NEXT: i32.store 0
33 ; CHECK-NEXT: .LBB1_2: # %false
34 ; CHECK-NEXT: end_block # label0:
35 ; CHECK-NEXT: i32.const 0
36 ; CHECK-NEXT: i32.const 1
37 ; CHECK-NEXT: i32.store 0
38 ; CHECK-NEXT: # fallthrough-return
40 ; FAST-LABEL: return_void_twice:
41 ; FAST: .functype return_void_twice (i32) -> ()
44 ; FAST-NEXT: local.get 0
46 ; FAST-NEXT: br_if 0 # 0: down to label0
47 ; FAST-NEXT: # %bb.1: # %true
48 ; FAST-NEXT: i32.const 0
49 ; FAST-NEXT: i32.const 0
50 ; FAST-NEXT: i32.store 0
52 ; FAST-NEXT: .LBB1_2: # %false
53 ; FAST-NEXT: end_block # label0:
54 ; FAST-NEXT: i32.const 0
55 ; FAST-NEXT: i32.const 1
56 ; FAST-NEXT: i32.store 0
57 ; FAST-NEXT: # fallthrough-return
58 %b = icmp ne i32 %a, 0
59 br i1 %b, label %true, label %false