xref: /llvm-project/llvm/test/CodeGen/WebAssembly/signext-arg.ll (revision 122b0220fd45ee71acda912b0b712bb8edb6ba46)
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -asm-verbose=false -wasm-disable-explicit-locals -wasm-keep-registers | FileCheck %s
3
4target triple = "wasm32-unknown-unknown"
5
6declare i32 @get_int(i16 %arg)
7
8define i32 @func_1(i16 %arg1 , i32 %arg2) #0 {
9; CHECK-LABEL: func_1:
10; CHECK:         i32.const $push1=, 16
11; CHECK-NEXT:    i32.shl $push2=, $0, $pop1
12; CHECK-NEXT:    i32.const $push4=, 16
13; CHECK-NEXT:    i32.shr_s $push3=, $pop2, $pop4
14; CHECK-NEXT:    call $push0=, get_int, $pop3
15; CHECK-NEXT:    end_function
16entry:
17  %retval = call i32 @get_int(i16 signext %arg1)
18  ret i32 %retval
19}
20
21attributes #0 = {noinline nounwind optnone}
22