blob: 0bfc8f48dff5e779e2ca44ec46d3b3c699da0566 [file] [log] [blame]
Dan Gohman0828ba12017-11-08 19:24:21 +00001; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
Wouter van Oortmerssen8a9cb242018-08-27 15:45:51 +00002; RUN: llc < %s -asm-verbose=false -wasm-disable-explicit-locals -wasm-keep-registers | FileCheck %s
Dan Gohmanf2c1cae2018-01-23 16:55:44 +00003
4target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
Sam Clegga5908002018-05-10 17:49:11 +00005target triple = "wasm32-unknown-unknown"
Dan Gohman0828ba12017-11-08 19:24:21 +00006
7declare i32 @get_int(i16 %arg)
8
9define i32 @func_1(i16 %arg1 , i32 %arg2) #0 {
10; CHECK-LABEL: func_1:
Dan Gohmanf2c1cae2018-01-23 16:55:44 +000011; CHECK: i32.const $push1=, 16
Dan Gohman0828ba12017-11-08 19:24:21 +000012; CHECK-NEXT: i32.shl $push2=, $0, $pop1
13; CHECK-NEXT: i32.const $push4=, 16
14; CHECK-NEXT: i32.shr_s $push3=, $pop2, $pop4
Sam Clegg275d15e2019-02-23 00:07:39 +000015; CHECK-NEXT: i32.call $push0=, get_int, $pop3
Dan Gohmanf2c1cae2018-01-23 16:55:44 +000016; CHECK-NEXT: end_function
Dan Gohman0828ba12017-11-08 19:24:21 +000017entry:
18 %retval = call i32 @get_int(i16 signext %arg1)
19 ret i32 %retval
20}
21
22attributes #0 = {noinline nounwind optnone}