mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-22 04:22:57 +02:00
c7f8ab2cc1
Summary: Made it convert from register to stack based instructions, and removed the registers. Fixes to related code that was expecting register based instructions. Added the correct testing flag to all tests, depending on what the format they were expecting so far. Translated one test to stack format as example: reg-stackify-stack.ll tested: llvm-lit -v `find test -name WebAssembly` unittests/MC/* Reviewers: dschuff, sunfish Subscribers: sbc100, jgravelle-google, eraman, aheejin, llvm-commits, jfb Differential Revision: https://reviews.llvm.org/D51241 llvm-svn: 340750
32 lines
919 B
LLVM
32 lines
919 B
LLVM
; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers | FileCheck %s
|
|
|
|
; Make sure that argument offsets are correct even if some arguments are unused.
|
|
|
|
target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
|
|
target triple = "wasm32-unknown-unknown"
|
|
|
|
; CHECK-LABEL: unused_first:
|
|
; CHECK-NEXT: .param i32, i32{{$}}
|
|
; CHECK-NEXT: .result i32{{$}}
|
|
; CHECK-NEXT: return $1{{$}}
|
|
define i32 @unused_first(i32 %x, i32 %y) {
|
|
ret i32 %y
|
|
}
|
|
|
|
; CHECK-LABEL: unused_second:
|
|
; CHECK-NEXT: .param i32, i32{{$}}
|
|
; CHECK-NEXT: .result i32{{$}}
|
|
; CHECK-NEXT: return $0{{$}}
|
|
define i32 @unused_second(i32 %x, i32 %y) {
|
|
ret i32 %x
|
|
}
|
|
|
|
; CHECK-LABEL: call_something:
|
|
; CHECK-NEXT: {{^}} i32.call $drop=, return_something@FUNCTION{{$}}
|
|
; CHECK-NEXT: return{{$}}
|
|
declare i32 @return_something()
|
|
define void @call_something() {
|
|
call i32 @return_something()
|
|
ret void
|
|
}
|