1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00
llvm-mirror/test/CodeGen/WebAssembly/fast-isel-i24.ll
Thomas Lively 81bb5f99ad [WebAssembly] Remove datalayout strings from llc tests
The data layout strings do not have any effect on llc tests and will become
misleadingly out of date as we continue to update the canonical data layout, so
remove them from the tests.

Differential Revision: https://reviews.llvm.org/D105842
2021-07-14 11:17:08 -07:00

27 lines
677 B
LLVM

; RUN: llc < %s -O0 -wasm-keep-registers
; PR36564
; PR37546
; Test that fast-isel properly copes with i24 arguments and return types.
target triple = "wasm32-unknown-unknown"
; CHECK-LABEL: add:
; CHECK-NEXT: .functype add (i32, i32) -> (i32){{$}}
; CHECK-NEXT: local.get $push2=, 0{{$}}
; CHECK-NEXT: local.get $push1=, 1{{$}}
; CHECK-NEXT: i32.add $push0=, $pop2, $pop1{{$}}
; CHECK-NEXT: end_function
define i24 @add(i24 %x, i24 %y) {
%z = add i24 %x, %y
ret i24 %z
}
; CHECK-LABEL: return_zero:
; CHECK-NEXT: .functype return_zero () -> (i32){{$}}
; CHECK-NEXT: i32.const $push0=, 0{{$}}
; CHECK-NEXT: end_function
define i24 @return_zero() {
ret i24 0
}