llvm-project/llvm/test/CodeGen/WebAssembly/fast-isel-pr138479.ll
Hongyu Chen 9697f4b9e4
[WebAssembly][FastISel] Bail out on meeting non-integer type in selectTrunc (#167165)
Fixes https://github.com/llvm/llvm-project/issues/165438
With `simd128` enabled, we may meet vector type truncation in FastISel.
To respect #138479, this patch merely bails out on non-integer IR types,
though I prefer bailing out for all non-simple types as most targets
(X86, AArch64) do.
2025-11-12 04:33:41 +08:00

19 lines
631 B
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
; RUN: llc < %s -asm-verbose=false -fast-isel -fast-isel-abort=0 -verify-machineinstrs | FileCheck %s
target triple = "wasm32-unknown-unknown"
declare void @extern48(i48)
; CHECK-LABEL: call_trunc_i64_to_i48:
; CHECK: local.get 0
; CHECK-NEXT: call extern48
; CHECK-NEXT: end_function
define void @call_trunc_i64_to_i48(i64 %x) {
%x48 = trunc i64 %x to i48
call void @extern48(i48 %x48)
ret void
}
;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
; CHECK: {{.*}}