Files
clang-p2996/llvm/test/CodeGen/WebAssembly/simd-nonconst-sext.ll
Thomas Lively 122b0220fd [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

20 lines
623 B
LLVM

; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -mattr=+simd128 | FileCheck %s
; A regression test for a bug in the lowering of SIGN_EXTEND_INREG
; with SIMD and without sign-ext where ISel would crash if the index
; of the vector extract was not a constant.
target triple = "wasm32"
; CHECK-LABEL: foo:
; CHECK-NEXT: .functype foo () -> (f32)
; CHECK: i32x4.load16x4_u
; CHECK: f32.convert_i32_s
define float @foo() {
%1 = load <4 x i16>, <4 x i16>* undef, align 8
%2 = load i32, i32* undef, align 4
%vecext = extractelement <4 x i16> %1, i32 %2
%conv = sitofp i16 %vecext to float
ret float %conv
}