1; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers | FileCheck %s 2 3; Make sure that argument offsets are correct even if some arguments are unused. 4 5target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128" 6target triple = "wasm32-unknown-unknown" 7 8; CHECK-LABEL: unused_first: 9; CHECK-NEXT: .functype unused_first (i32, i32) -> (i32){{$}} 10; CHECK-NEXT: return $1{{$}} 11define i32 @unused_first(i32 %x, i32 %y) { 12 ret i32 %y 13} 14 15; CHECK-LABEL: unused_second: 16; CHECK-NEXT: .functype unused_second (i32, i32) -> (i32){{$}} 17; CHECK-NEXT: return $0{{$}} 18define i32 @unused_second(i32 %x, i32 %y) { 19 ret i32 %x 20} 21 22; CHECK-LABEL: call_something: 23; CHECK: {{^}} call $drop=, return_something{{$}} 24; CHECK-NEXT: return{{$}} 25declare i32 @return_something() 26define void @call_something() { 27 call i32 @return_something() 28 ret void 29} 30