reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
# RUN: llc -mtriple=wasm32-unknown-unknown %s -o - -run-pass wasm-argument-move  | FileCheck %s

# wasm-argument-move pass moves all ARGUMENT instructions to the top of the
# entry BB.
---
name: argument_i32
# CHECK-LABEL: argument_i32
body: |
  ; CHECK-LABEL: bb.0:
  ; CHECK-NEXT: %1:i32 = ARGUMENT_i32 0
  bb.0:
    %0:i32 = CONST_I32 0, implicit-def $arguments
    %1:i32 = ARGUMENT_i32 0, implicit $arguments
    RETURN implicit-def $arguments
...
---
name: argument_i64
# CHECK-LABEL: argument_i64
body: |
  ; CHECK-LABEL: bb.0:
  ; CHECK-NEXT: %1:i64 = ARGUMENT_i64 0
  bb.0:
    %0:i32 = CONST_I32 0, implicit-def $arguments
    %1:i64 = ARGUMENT_i64 0, implicit $arguments
    RETURN implicit-def $arguments
...
---
name: argument_f32
# CHECK-LABEL: argument_f32
body: |
  ; CHECK-LABEL: bb.0:
  ; CHECK-NEXT: %1:f32 = ARGUMENT_f32 0
  bb.0:
    %0:i32 = CONST_I32 0, implicit-def $arguments
    %1:f32 = ARGUMENT_f32 0, implicit $arguments
    RETURN implicit-def $arguments
...
---
name: argument_f64
# CHECK-LABEL: argument_f64
body: |
  ; CHECK-LABEL: bb.0:
  ; CHECK-NEXT: %1:f64 = ARGUMENT_f64 0
  bb.0:
    %0:i32 = CONST_I32 0, implicit-def $arguments
    %1:f64 = ARGUMENT_f64 0, implicit $arguments
    RETURN implicit-def $arguments
...
---
name: argument_exnref
# CHECK-LABEL: argument_exnref
body: |
  ; CHECK-LABEL: bb.0:
  ; CHECK-NEXT: %1:exnref = ARGUMENT_exnref 0
  bb.0:
    %0:i32 = CONST_I32 0, implicit-def $arguments
    %1:exnref = ARGUMENT_exnref 0, implicit $arguments
    RETURN implicit-def $arguments
...