27 lines · plain
1; RUN: llc < %s -O0 -wasm-keep-registers2; PR365643; PR375464 5; Test that fast-isel properly copes with i24 arguments and return types.6 7target triple = "wasm32-unknown-unknown"8 9; CHECK-LABEL: add:10; CHECK-NEXT: .functype add (i32, i32) -> (i32){{$}}11; CHECK-NEXT: local.get $push2=, 0{{$}}12; CHECK-NEXT: local.get $push1=, 1{{$}}13; CHECK-NEXT: i32.add $push0=, $pop2, $pop1{{$}}14; CHECK-NEXT: end_function15define i24 @add(i24 %x, i24 %y) {16 %z = add i24 %x, %y17 ret i24 %z18}19 20; CHECK-LABEL: return_zero:21; CHECK-NEXT: .functype return_zero () -> (i32){{$}}22; CHECK-NEXT: i32.const $push0=, 0{{$}}23; CHECK-NEXT: end_function24define i24 @return_zero() {25 ret i24 026}27