1 ; RUN: llc < %s -asm-verbose=false | FileCheck %s 2 3 ; Test that basic loads are assembled properly. 4 5 target datalayout = "e-p:32:32-i64:64-n32:64-S128" 6 target triple = "wasm32-unknown-unknown" 7 8 ; CHECK-LABEL: ldi32: 9 ; CHECK-NEXT: .param i32{{$}} 10 ; CHECK-NEXT: .result i32{{$}} 11 ; CHECK-NEXT: i32.load $push[[NUM:[0-9]+]]=, 0($0){{$}} 12 ; CHECK-NEXT: return $pop[[NUM]]{{$}} 13 define i32 @ldi32(i32 *%p) { 14 %v = load i32, i32* %p 15 ret i32 %v 16 } 17 18 ; CHECK-LABEL: ldi64: 19 ; CHECK-NEXT: .param i32{{$}} 20 ; CHECK-NEXT: .result i64{{$}} 21 ; CHECK-NEXT: i64.load $push[[NUM:[0-9]+]]=, 0($0){{$}} 22 ; CHECK-NEXT: return $pop[[NUM]]{{$}} 23 define i64 @ldi64(i64 *%p) { 24 %v = load i64, i64* %p 25 ret i64 %v 26 } 27 28 ; CHECK-LABEL: ldf32: 29 ; CHECK-NEXT: .param i32{{$}} 30 ; CHECK-NEXT: .result f32{{$}} 31 ; CHECK-NEXT: f32.load $push[[NUM:[0-9]+]]=, 0($0){{$}} 32 ; CHECK-NEXT: return $pop[[NUM]]{{$}} 33 define float @ldf32(float *%p) { 34 %v = load float, float* %p 35 ret float %v 36 } 37 38 ; CHECK-LABEL: ldf64: 39 ; CHECK-NEXT: .param i32{{$}} 40 ; CHECK-NEXT: .result f64{{$}} 41 ; CHECK-NEXT: f64.load $push[[NUM:[0-9]+]]=, 0($0){{$}} 42 ; CHECK-NEXT: return $pop[[NUM]]{{$}} 43 define double @ldf64(double *%p) { 44 %v = load double, double* %p 45 ret double %v 46 } 47