• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -O0 -wasm-keep-registers
2; PR36564
3; PR37546
4
5; Test that fast-isel properly copes with i24 arguments and return types.
6
7target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
8target triple = "wasm32-unknown-unknown"
9
10; CHECK-LABEL: add:
11; CHECK-NEXT: .functype add (i32, i32) -> (i32){{$}}
12; CHECK-NEXT: local.get	$push2=, 0{{$}}
13; CHECK-NEXT: local.get	$push1=, 1{{$}}
14; CHECK-NEXT: i32.add 	$push0=, $pop2, $pop1{{$}}
15; CHECK-NEXT: end_function
16define i24 @add(i24 %x, i24 %y) {
17    %z = add i24 %x, %y
18    ret i24 %z
19}
20
21; CHECK-LABEL: return_zero:
22; CHECK-NEXT: .functype return_zero () -> (i32){{$}}
23; CHECK-NEXT: i32.const	$push0=, 0{{$}}
24; CHECK-NEXT: end_function
25define i24 @return_zero() {
26    ret i24 0
27}
28