brintos

brintos / llvm-project-archived public Read only

0
0
Text · 844 B · e37b014 Raw
29 lines · plain
1; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers | FileCheck %s2 3; Make sure that argument offsets are correct even if some arguments are unused.4 5target triple = "wasm32-unknown-unknown"6 7; CHECK-LABEL: unused_first:8; CHECK-NEXT: .functype unused_first (i32, i32) -> (i32){{$}}9; CHECK-NEXT: return $1{{$}}10define i32 @unused_first(i32 %x, i32 %y) {11  ret i32 %y12}13 14; CHECK-LABEL: unused_second:15; CHECK-NEXT: .functype unused_second (i32, i32) -> (i32){{$}}16; CHECK-NEXT: return $0{{$}}17define i32 @unused_second(i32 %x, i32 %y) {18  ret i32 %x19}20 21; CHECK-LABEL: call_something:22; CHECK:      {{^}} call $drop=, return_something{{$}}23; CHECK-NEXT: return{{$}}24declare i32 @return_something()25define void @call_something() {26  call i32 @return_something()27  ret void28}29