1 # RUN: llc -mtriple=wasm32-unknown-unknown %s -o - -run-pass wasm-argument-move | FileCheck %s
3 # wasm-argument-move pass moves all ARGUMENT instructions to the top of the
7 # CHECK-LABEL: argument_i32
10 ; CHECK-NEXT: %1:i32 = ARGUMENT_i32 0
12 %0:i32 = CONST_I32 0, implicit-def $arguments
13 %1:i32 = ARGUMENT_i32 0, implicit $arguments
14 RETURN implicit-def $arguments
18 # CHECK-LABEL: argument_i64
21 ; CHECK-NEXT: %1:i64 = ARGUMENT_i64 0
23 %0:i32 = CONST_I32 0, implicit-def $arguments
24 %1:i64 = ARGUMENT_i64 0, implicit $arguments
25 RETURN implicit-def $arguments
29 # CHECK-LABEL: argument_f32
32 ; CHECK-NEXT: %1:f32 = ARGUMENT_f32 0
34 %0:i32 = CONST_I32 0, implicit-def $arguments
35 %1:f32 = ARGUMENT_f32 0, implicit $arguments
36 RETURN implicit-def $arguments
40 # CHECK-LABEL: argument_f64
43 ; CHECK-NEXT: %1:f64 = ARGUMENT_f64 0
45 %0:i32 = CONST_I32 0, implicit-def $arguments
46 %1:f64 = ARGUMENT_f64 0, implicit $arguments
47 RETURN implicit-def $arguments
50 name: argument_funcref
51 # CHECK-LABEL: argument_funcref
54 ; CHECK-NEXT: %1:funcref = ARGUMENT_funcref 0
56 %0:i32 = CONST_I32 0, implicit-def $arguments
57 %1:funcref = ARGUMENT_funcref 0, implicit $arguments
58 RETURN implicit-def $arguments
61 name: argument_externref
62 # CHECK-LABEL: argument_externref
65 ; CHECK-NEXT: %1:externref = ARGUMENT_externref 0
67 %0:i32 = CONST_I32 0, implicit-def $arguments
68 %1:externref = ARGUMENT_externref 0, implicit $arguments
69 RETURN implicit-def $arguments