blob: 880411f744f961d2b0e8f8a829243d2558e4693a [file] [log] [blame]
JF Bastiend7fcc6f2015-07-31 18:13:27 +00001; RUN: llc < %s -asm-verbose=false | FileCheck %s
2
3; Make sure that argument offsets are correct even if some arguments are unused.
4
Dan Gohmandde8dce2015-08-19 20:30:20 +00005target datalayout = "e-p:32:32-i64:64-n32:64-S128"
JF Bastiend7fcc6f2015-07-31 18:13:27 +00006target triple = "wasm32-unknown-unknown"
7
8; CHECK-LABEL: unused_first:
9; CHECK-NEXT: (setlocal @0 (argument 1))
JF Bastien8f9aea02015-08-01 04:48:44 +000010; CHECK-NEXT: (return @0)
JF Bastiend7fcc6f2015-07-31 18:13:27 +000011define i32 @unused_first(i32 %x, i32 %y) {
12 ret i32 %y
13}
14
15; CHECK-LABEL: unused_second:
16; CHECK-NEXT: (setlocal @0 (argument 0))
JF Bastien8f9aea02015-08-01 04:48:44 +000017; CHECK-NEXT: (return @0)
JF Bastiend7fcc6f2015-07-31 18:13:27 +000018define i32 @unused_second(i32 %x, i32 %y) {
19 ret i32 %x
20}