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