|
1 |
| -; RUN: llc < %s -verify-machineinstrs | FileCheck %s --check-prefixes CHECK,NORMAL |
2 |
| -; RUN: llc < %s -fast-isel -fast-isel-abort=1 -verify-machineinstrs | FileCheck %s --check-prefixes CHECK,NORMAL |
3 |
| -; RUN: llc < %s -verify-machineinstrs --trap-unreachable | FileCheck %s --check-prefixes CHECK,NORMAL |
4 |
| -; RUN: llc < %s -fast-isel -fast-isel-abort=1 -verify-machineinstrs --trap-unreachable | FileCheck %s --check-prefixes CHECK,NORMAL |
5 |
| -; RUN: llc < %s -verify-machineinstrs --trap-unreachable --no-trap-after-noreturn | FileCheck %s --check-prefixes CHECK,NTANR |
6 |
| -; RUN: llc < %s -fast-isel -fast-isel-abort=1 -verify-machineinstrs --trap-unreachable --no-trap-after-noreturn | FileCheck %s --check-prefixes CHECK,FNTANR |
| 1 | +; RUN: llc < %s -verify-machineinstrs | FileCheck %s |
| 2 | +; RUN: llc < %s -fast-isel -fast-isel-abort=1 -verify-machineinstrs | FileCheck %s |
| 3 | +; RUN: llc < %s -verify-machineinstrs --trap-unreachable | FileCheck %s |
| 4 | +; RUN: llc < %s -fast-isel -fast-isel-abort=1 -verify-machineinstrs --trap-unreachable | FileCheck %s |
| 5 | +; RUN: llc < %s -verify-machineinstrs --trap-unreachable --no-trap-after-noreturn | FileCheck %s |
| 6 | +; RUN: llc < %s -fast-isel -fast-isel-abort=1 -verify-machineinstrs --trap-unreachable --no-trap-after-noreturn | FileCheck %s |
7 | 7 |
|
8 | 8 | target triple = "wasm32-unknown-unknown"
|
9 | 9 |
|
@@ -37,25 +37,12 @@ define void @dtrap_ret_void() {
|
37 | 37 |
|
38 | 38 | ; Test that LLVM trap followed by LLVM unreachable becomes exactly one wasm unreachable.
|
39 | 39 | define void @trap_unreach() {
|
40 |
| -; NORMAL-LABEL: trap_unreach: |
41 |
| -; NORMAL: .functype trap_unreach () -> () |
42 |
| -; NORMAL-NEXT: # %bb.0: |
43 |
| -; NORMAL-NEXT: unreachable |
44 |
| -; NORMAL-NEXT: unreachable |
45 |
| -; NORMAL-NEXT: end_function |
46 |
| -; |
47 |
| -; NTANR-LABEL: trap_unreach: |
48 |
| -; NTANR: .functype trap_unreach () -> () |
49 |
| -; NTANR-NEXT: # %bb.0: |
50 |
| -; NTANR-NEXT: unreachable |
51 |
| -; NTANR-NEXT: end_function |
52 |
| -; |
53 |
| -; FNTANR-LABEL: trap_unreach: |
54 |
| -; FNTANR: .functype trap_unreach () -> () |
55 |
| -; FNTANR-NEXT: # %bb.0: |
56 |
| -; FNTANR-NEXT: unreachable |
57 |
| -; FNTANR-NEXT: unreachable |
58 |
| -; FNTANR-NEXT: end_function |
| 40 | +; CHECK-LABEL: trap_unreach: |
| 41 | +; CHECK: .functype trap_unreach () -> () |
| 42 | +; CHECK-NEXT: # %bb.0: |
| 43 | +; CHECK-NEXT: unreachable |
| 44 | +; CHECK-NEXT: unreachable |
| 45 | +; CHECK-NEXT: end_function |
59 | 46 | call void @llvm.trap()
|
60 | 47 | unreachable
|
61 | 48 | }
|
@@ -83,25 +70,12 @@ define i32 @missing_ret_unreach() {
|
83 | 70 | ; This is similar to the above test, but ensures wasm unreachable is emitted even
|
84 | 71 | ; after a noreturn call.
|
85 | 72 | define i32 @missing_ret_noreturn_unreach() {
|
86 |
| -; NORMAL-LABEL: missing_ret_noreturn_unreach: |
87 |
| -; NORMAL: .functype missing_ret_noreturn_unreach () -> (i32) |
88 |
| -; NORMAL-NEXT: # %bb.0: |
89 |
| -; NORMAL-NEXT: call ext_never_return |
90 |
| -; NORMAL-NEXT: unreachable |
91 |
| -; NORMAL-NEXT: end_function |
92 |
| -; |
93 |
| -; NTANR-LABEL: missing_ret_noreturn_unreach: |
94 |
| -; NTANR: .functype missing_ret_noreturn_unreach () -> (i32) |
95 |
| -; NTANR-NEXT: # %bb.0: |
96 |
| -; NTANR-NEXT: call ext_never_return |
97 |
| -; NTANR-NEXT: end_function |
98 |
| -; |
99 |
| -; FNTANR-LABEL: missing_ret_noreturn_unreach: |
100 |
| -; FNTANR: .functype missing_ret_noreturn_unreach () -> (i32) |
101 |
| -; FNTANR-NEXT: # %bb.0: |
102 |
| -; FNTANR-NEXT: call ext_never_return |
103 |
| -; FNTANR-NEXT: unreachable |
104 |
| -; FNTANR-NEXT: end_function |
| 73 | +; CHECK-LABEL: missing_ret_noreturn_unreach: |
| 74 | +; CHECK: .functype missing_ret_noreturn_unreach () -> (i32) |
| 75 | +; CHECK-NEXT: # %bb.0: |
| 76 | +; CHECK-NEXT: call ext_never_return |
| 77 | +; CHECK-NEXT: unreachable |
| 78 | +; CHECK-NEXT: end_function |
105 | 79 | call void @ext_never_return()
|
106 | 80 | unreachable
|
107 | 81 | }
|
@@ -133,25 +107,12 @@ define i32 @i32_sig_match_unreach() {
|
133 | 107 | }
|
134 | 108 |
|
135 | 109 | define void @void_sig_match_noreturn_unreach() {
|
136 |
| -; NORMAL-LABEL: void_sig_match_noreturn_unreach: |
137 |
| -; NORMAL: .functype void_sig_match_noreturn_unreach () -> () |
138 |
| -; NORMAL-NEXT: # %bb.0: |
139 |
| -; NORMAL-NEXT: call ext_never_return |
140 |
| -; NORMAL-NEXT: unreachable |
141 |
| -; NORMAL-NEXT: end_function |
142 |
| -; |
143 |
| -; NTANR-LABEL: void_sig_match_noreturn_unreach: |
144 |
| -; NTANR: .functype void_sig_match_noreturn_unreach () -> () |
145 |
| -; NTANR-NEXT: # %bb.0: |
146 |
| -; NTANR-NEXT: call ext_never_return |
147 |
| -; NTANR-NEXT: end_function |
148 |
| -; |
149 |
| -; FNTANR-LABEL: void_sig_match_noreturn_unreach: |
150 |
| -; FNTANR: .functype void_sig_match_noreturn_unreach () -> () |
151 |
| -; FNTANR-NEXT: # %bb.0: |
152 |
| -; FNTANR-NEXT: call ext_never_return |
153 |
| -; FNTANR-NEXT: unreachable |
154 |
| -; FNTANR-NEXT: end_function |
| 110 | +; CHECK-LABEL: void_sig_match_noreturn_unreach: |
| 111 | +; CHECK: .functype void_sig_match_noreturn_unreach () -> () |
| 112 | +; CHECK-NEXT: # %bb.0: |
| 113 | +; CHECK-NEXT: call ext_never_return |
| 114 | +; CHECK-NEXT: unreachable |
| 115 | +; CHECK-NEXT: end_function |
155 | 116 | call void @ext_never_return()
|
156 | 117 | unreachable
|
157 | 118 | }
|
|
0 commit comments