1 ; RUN: llc < %s -mattr=+simd128 | FileCheck %s
3 ; Regression test for a crash caused by
4 ; WebAssemblyTargetLowering::ReplaceNodeResults not being
5 ; implemented. Since SIMD is enabled, sign_ext_inreg is custom lowered
6 ; but the result is i16, an illegal value. This requires
7 ; ReplaceNodeResults to resolve, but the default implementation is to
10 target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
11 target triple = "wasm32-unknown-emscripten"
14 ; CHECK-NEXT: i32.store16
17 %0 = load i32*, i32** undef, align 4
18 %1 = load i32, i32* %0, align 4
19 %2 = load i32, i32* undef, align 4
20 %conv67 = trunc i32 %2 to i8
21 %conv68 = sext i8 %conv67 to i16
22 store i16 %conv68, i16* null, align 2