mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-25 04:35:32 -04:00
0118969fbd
Summary: Match spec format: https://github.com/WebAssembly/spec/blob/master/ml-proto/test/fac.wasm Reviewers: sunfish Subscribers: llvm-commits, jfb Differential Revision: http://reviews.llvm.org/D12307 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245986 91177308-0d34-0410-b5e6-96231b3b80d8
23 lines
651 B
LLVM
23 lines
651 B
LLVM
; RUN: llc < %s -asm-verbose=false | FileCheck %s
|
|
|
|
; Make sure that argument offsets are correct even if some arguments are unused.
|
|
|
|
target datalayout = "e-p:32:32-i64:64-n32:64-S128"
|
|
target triple = "wasm32-unknown-unknown"
|
|
|
|
; CHECK-LABEL: (func $unused_first
|
|
; CHECK-NEXT: (param i32) (param i32) (result i32)
|
|
; CHECK-NEXT: (setlocal @0 (argument 1))
|
|
; CHECK-NEXT: (return @0)
|
|
define i32 @unused_first(i32 %x, i32 %y) {
|
|
ret i32 %y
|
|
}
|
|
|
|
; CHECK-LABEL: (func $unused_second
|
|
; CHECK-NEXT: (param i32) (param i32) (result i32)
|
|
; CHECK-NEXT: (setlocal @0 (argument 0))
|
|
; CHECK-NEXT: (return @0)
|
|
define i32 @unused_second(i32 %x, i32 %y) {
|
|
ret i32 %x
|
|
}
|